configure.ac: drop -Wl,--fatal-warnings
PATCH 1/1 configure.ac: drop -Wl,--fatal-warnings
Drop -Wl,--fatal-warnings with --enable-static to avoid the following static build failure:
configure:4778: checking for strtod
configure:4778: /home/autobuild/autobuild/instance-8/output-1/host/bin/powerpc-buildroot-linux-uclibcspe-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mabi=spe -mfloat-gprs=single -Wa,-me500 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--fatal-warnings conftest.c >&5 /home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibcspe/8.4.0/../../../../powerpc-buildroot-linux-uclibcspe/bin/ld: warning: conftest has a LOAD segment with RWX permissions
collect2: error: ld returned 1 exit status
[...]
In file included from arith_yylex.c:44:
system.h:74:22: error: static declaration of 'strtod' follows non-static declaration
static inline double strtod(const char *nptr, char **endptr)
^~~~~~
Fixes:
- http://autobuild.buildroot.org/results/a54fdc7d1b94beb47203373ae35b08d9cea8d42c
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
@@ -34,7 +34,7 @@ fi AC_ARG_ENABLE(static, AS_HELP_STRING(--enable-static, \ [Build statical linked program])) if test "$enable_static" = "yes"; then - export LDFLAGS="-static -Wl,--fatal-warnings" + export LDFLAGS="-static" fi AC_ARG_ENABLE(fnmatch, AS_HELP_STRING(--disable-fnmatch, \
Signature · 1 line
2.43.0
Hi,
Quoted 7 lines · Fabrice Fontaine
Drop -Wl,--fatal-warnings with --enable-static to avoid the following static build failure:
configure:4778: checking for strtod
configure:4778:/home/autobuild/autobuild/instance-8/output-1/host/bin/powerpc-buildroot-linux-uclibcspe-gcc-o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mabi=spe -mfloat-gprs=single -Wa,-me500 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--fatal-warningsconftest.c>&5/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibcspe/8.4.0/../../../../powerpc-buildroot-linux-uclibcspe/bin/ld: warning: conftest has a LOAD segment with RWX permissions
collect2: error: ld returned 1 exit status
Where is this warning coming from? Does it show a real problem that needs to be addressed?
As for the actual patch, you're right that configure should not be using -Wl,--fatal-warnings, it should be avoided there for the same reason -Werror should be, the warnings that get promoted to errors differ between toolchain versions and in general, it is not possible to ensure that all valid toolchains, all valid warning flags, result in no warnings.
I suspect though that it was added for a reason, that there were things that *should* cause configure checks to fail, that did not fail except with -Wl,--fatal-warnings. Whatever that reason may have been, it will need to be handled differently if -Wl,--fatal-warnings is dropped. Unfortunately, it was added to dash back in 2007 before the current mailing list existed, so I am having trouble finding any explanation for what those errors may have been.
Dropping it sounds good to me if no one can tell why it is there, but I would suggest some experimentation may be in order to try and figure that out first.
Cheers,
Harald van Dijk
Quoted 27 lines · Harald van Dijk
Quoted 7 lines · Fabrice Fontaine
Drop -Wl,--fatal-warnings with --enable-static to avoid the following static build failure:
configure:4778: checking for strtod
configure:4778:/home/autobuild/autobuild/instance-8/output-1/host/bin/powerpc-buildroot-linux-uclibcspe-gcc-o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mabi=spe -mfloat-gprs=single -Wa,-me500 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--fatal-warningsconftest.c>&5/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibcspe/8.4.0/../../../../powerpc-buildroot-linux-uclibcspe/bin/ld: warning: conftest has a LOAD segment with RWX permissions
collect2: error: ld returned 1 exit statusWhere is this warning coming from? Does it show a real problem that needs to be addressed?
As for the actual patch, you're right that configure should not be using -Wl,--fatal-warnings, it should be avoided there for the same reason -Werror should be, the warnings that get promoted to errors differ between toolchain versions and in general, it is not possible to ensure that all valid toolchains, all valid warning flags, result in no warnings.
I suspect though that it was added for a reason, that there were things that *should* cause configure checks to fail, that did not fail except with -Wl,--fatal-warnings. Whatever that reason may have been, it will need to be handled differently if -Wl,--fatal-warnings is dropped. Unfortunately, it was added to dash back in 2007 before the current mailing list existed, so I am having trouble finding any explanation for what those errors may have been.
Quoted 3 lines
Dropping it sounds good to me if no one can tell why it is there, but I would suggest some experimentation may be in order to try and figure that out first.
The patch was sent by Alexey Gladkov back in 2006. Let's ask him to see if he remembers what the -Wl,--fatal-warnings was for?
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 28 lines · Herbert Xu
Quoted 27 lines · Harald van Dijk
Quoted 7 lines · Fabrice Fontaine
Drop -Wl,--fatal-warnings with --enable-static to avoid the following static build failure:
configure:4778: checking for strtod
configure:4778:/home/autobuild/autobuild/instance-8/output-1/host/bin/powerpc-buildroot-linux-uclibcspe-gcc-o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mabi=spe -mfloat-gprs=single -Wa,-me500 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--fatal-warningsconftest.c>&5/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibcspe/8.4.0/../../../../powerpc-buildroot-linux-uclibcspe/bin/ld: warning: conftest has a LOAD segment with RWX permissions
collect2: error: ld returned 1 exit statusWhere is this warning coming from? Does it show a real problem that needs to be addressed?
As for the actual patch, you're right that configure should not be using -Wl,--fatal-warnings, it should be avoided there for the same reason -Werror should be, the warnings that get promoted to errors differ between toolchain versions and in general, it is not possible to ensure that all valid toolchains, all valid warning flags, result in no warnings.
I suspect though that it was added for a reason, that there were things that *should* cause configure checks to fail, that did not fail except with -Wl,--fatal-warnings. Whatever that reason may have been, it will need to be handled differently if -Wl,--fatal-warnings is dropped. Unfortunately, it was added to dash back in 2007 before the current mailing list existed, so I am having trouble finding any explanation for what those errors may have been.
Quoted 6 lines
Quoted 3 lines
Dropping it sounds good to me if no one can tell why it is there, but I would suggest some experimentation may be in order to try and figure that out first.
The patch was sent by Alexey Gladkov back in 2006. Let's ask him to see if he remembers what the -Wl,--fatal-warnings was for?
Oh. It was so long ago. If I'm not mistaken, -Wl,--fatal-warnings was added to --enable-static because of --with-libedit. But this may be a false memory. Sorry.
[Thu Oct 4 14:21:44 2007 +0800] 12dc496 "[BUILD] Add --enable-static option to configure." [Tue May 23 20:52:23 2006 +1000] 13537aa "[BUILD] Added --with-libedit option to configure"
Quoted 6 lines
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Signature · 1 line
Rgrds, legion
Quoted 15 lines · Fabrice Fontaine
Drop -Wl,--fatal-warnings with --enable-static to avoid the following static build failure:
configure:4778: checking for strtod
configure:4778:/home/autobuild/autobuild/instance-8/output-1/host/bin/powerpc-buildroot-linux-uclibcspe-gcc-o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mabi=spe -mfloat-gprs=single -Wa,-me500 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--fatal-warningsconftest.c>&5/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibcspe/8.4.0/../../../../powerpc-buildroot-linux-uclibcspe/bin/ld: warning: conftest has a LOAD segment with RWX permissions
collect2: error: ld returned 1 exit status[...]
In file included from arith_yylex.c:44:
system.h:74:22: error: static declaration of 'strtod' follows non-static declaration
static inline doublestrtod(const char *nptr, char **endptr)^~~~~~
Quoted 7 lines
Fixes:
- http://autobuild.buildroot.org/results/a54fdc7d1b94beb47203373ae35b08d9cea8d42cSigned-off-by Fabrice Fontaine <[email protected]>--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt