* [PATCH] configure.ac: drop -Wl,--fatal-warnings
@ 2024-02-16 16:33 Fabrice Fontaine
2024-02-16 17:55 ` Harald van Dijk
2024-04-07 5:17 ` Herbert Xu
0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2024-02-16 16:33 UTC (permalink / raw)
To: dash; +Cc: 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-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
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5524650..6993364 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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, \
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] configure.ac: drop -Wl,--fatal-warnings 2024-02-16 16:33 [PATCH] configure.ac: drop -Wl,--fatal-warnings Fabrice Fontaine @ 2024-02-16 17:55 ` Harald van Dijk 2024-04-06 9:41 ` Herbert Xu 2024-04-07 5:17 ` Herbert Xu 1 sibling, 1 reply; 5+ messages in thread From: Harald van Dijk @ 2024-02-16 17:55 UTC (permalink / raw) To: Fabrice Fontaine, dash Hi, On 16/02/2024 16:33, Fabrice Fontaine wrote: > 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 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] configure.ac: drop -Wl,--fatal-warnings 2024-02-16 17:55 ` Harald van Dijk @ 2024-04-06 9:41 ` Herbert Xu 2024-04-06 12:24 ` Alexey Gladkov 0 siblings, 1 reply; 5+ messages in thread From: Herbert Xu @ 2024-04-06 9:41 UTC (permalink / raw) To: Harald van Dijk, Alexey Gladkov; +Cc: Fabrice Fontaine, dash On Fri, Feb 16, 2024 at 05:55:46PM +0000, Harald van Dijk wrote: > > On 16/02/2024 16:33, Fabrice Fontaine wrote: > > 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 > > 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. 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, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] configure.ac: drop -Wl,--fatal-warnings 2024-04-06 9:41 ` Herbert Xu @ 2024-04-06 12:24 ` Alexey Gladkov 0 siblings, 0 replies; 5+ messages in thread From: Alexey Gladkov @ 2024-04-06 12:24 UTC (permalink / raw) To: Herbert Xu; +Cc: Harald van Dijk, Fabrice Fontaine, dash On Sat, Apr 06, 2024 at 05:41:43PM +0800, Herbert Xu wrote: > On Fri, Feb 16, 2024 at 05:55:46PM +0000, Harald van Dijk wrote: > > > > On 16/02/2024 16:33, Fabrice Fontaine wrote: > > > 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 > > > > 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. > > 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" > Thanks, > -- > Email: Herbert Xu <herbert@gondor.apana.org.au> > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt > -- Rgrds, legion ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] configure.ac: drop -Wl,--fatal-warnings 2024-02-16 16:33 [PATCH] configure.ac: drop -Wl,--fatal-warnings Fabrice Fontaine 2024-02-16 17:55 ` Harald van Dijk @ 2024-04-07 5:17 ` Herbert Xu 1 sibling, 0 replies; 5+ messages in thread From: Herbert Xu @ 2024-04-07 5:17 UTC (permalink / raw) To: Fabrice Fontaine; +Cc: dash On Fri, Feb 16, 2024 at 05:33:19PM +0100, Fabrice Fontaine wrote: > 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 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-07 5:16 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-02-16 16:33 [PATCH] configure.ac: drop -Wl,--fatal-warnings Fabrice Fontaine 2024-02-16 17:55 ` Harald van Dijk 2024-04-06 9:41 ` Herbert Xu 2024-04-06 12:24 ` Alexey Gladkov 2024-04-07 5:17 ` Herbert Xu
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.