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

Wishlist: Support user build flags #54

Open
d-torrance opened this issue Jul 10, 2021 · 1 comment
Open

Wishlist: Support user build flags #54

d-torrance opened this issue Jul 10, 2021 · 1 comment

Comments

@d-torrance
Copy link
Contributor

There are some standard variables (CPPFLAGS, CFLAGS, CXXFLAGS, and LDFLAGS) that are frequently set by users to pass build flags to compilers. For example, Debian uses them for hardening binaries in its packages.

It would be great if support for these variables be could be added. For gprbuild, the following works for C code:

        for Default_Switches ("C") use External_As_List ("CPPFLAGS", " ") &
            External_As_List ("CFLAGS", " ");
@zhangyusi-hub
Copy link

Hello, I want to ask you two problems about the gnat compilers.
I used the following method to compile the makefile in /PHCpack/src/MPI:
cd /PHCpack/src/MPI
make all

But there is a following error with gnatbind: invalid switch: -C
gcc -c call_hello.c
gnatmake -c hello.adb
gnatmake: objects up to date.
gnatbind -n -C hello
gnatbind: invalid switch: -C

And when I modify it with gnatbind -n -c hello, there is another error with gnatlink: Failed to open binder output:
gcc -c call_hello.c
gnatmake -c hello.adb
gnatmake: objects up to date.
gnatbind -n -c hello
gnatlink -c hello call_hello.o adatest.o -o adatest
--LINK=/BIGDATA1/app/MPI/mpich/3.2.1-gcc-4.8.5-dynamic/bin/mpicc
gnatlink: Failed to open binder output
Could you tell me how to solve the two problems about the compile commands gnatbind and gnatlink ?

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

2 participants