Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gprconfig does not find compilers - patch #77

Open
bib1963 opened this issue Mar 12, 2020 · 5 comments
Open

gprconfig does not find compilers - patch #77

bib1963 opened this issue Mar 12, 2020 · 5 comments

Comments

@bib1963
Copy link

bib1963 commented Mar 12, 2020

Lots of people seem to have problems with gprconfig not finding compilers. Hopefully the small patch below is acceptable. This makes it work on all openuse installs on 32bit/64bit & the Pi4. Hardly worth asking for a pull...

index 9842d7c7..5ea6729f 100644
--- a/share/gprconfig/compilers.xml
+++ b/share/gprconfig/compilers.xml
@@ -181,7 +181,8 @@
       <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
     </variable>
     <runtimes default="default,kernel,native">
-       <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
+       <directory group="default" >\.\./lib(64)?/gcc(-lib)?/$TARGET/[1-9]/adalib/</directory>
+       <directory group="default" >\.\./lib(64)?/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
        <directory group="default" contents="^rts-">\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory>
        <directory group="2" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
        <directory group="1" >\.\./$TARGET/lib/gnat/(.*)/adalib/</directory>
diff --git a/share/gprconfig/targetset.xml b/share/gprconfig/targetset.xml
index 96eb43ad..b736e382 100644
--- a/share/gprconfig/targetset.xml
+++ b/share/gprconfig/targetset.xml
@@ -38,6 +38,7 @@
   <targetset canonical="aarch64-linux">
     <target>aarch64-linux</target>
     <target>aarch64-linux-gnu</target>
+    <target>aarch64-.*linux.*</target>
   </targetset>
 
   <targetset canonical="arm-linux">
@t-14
Copy link
Contributor

t-14 commented Mar 27, 2020

Thank you for your contribution. The following part is a bit puzzling however:

+ <directory group="default" >\.\./lib(64)?/gcc(-lib)?/$TARGET/[1-9]/adalib/</directory>

what is the naming convention, exactly? is it really a random figure from 1 to 9?

@bib1963
Copy link
Author

bib1963 commented Mar 27, 2020 via email

@t-14
Copy link
Contributor

t-14 commented Mar 28, 2020

It's just the major version number.
...
Or you could just say sod it...

On the contrary, if it's a major version number, then that's what we should check rather than an arbitrary number. Otherwise, we may end up considering e.g. gcc-7's hierarchy while scanning gcc-8 toolchain. We will look into that.

@qunying
Copy link

qunying commented May 25, 2020

It is not universally correct, as in Slackware, it is the exact version of the compiler:

ls -l /usr/lib64/gcc/x86_64-slackware-linux/
drwxr-xr-x 9 root root 4096 Apr  1 20:55 9.3.0/

@bib1963
Copy link
Author

bib1963 commented May 26, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants