[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -no-undefined support for GNU/Linux
From: |
Ralf Wildenhues |
Subject: |
Re: -no-undefined support for GNU/Linux |
Date: |
Wed, 18 Mar 2009 22:06:28 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Mike Frysinger wrote on Wed, Mar 18, 2009 at 09:27:42AM CET:
> On Wednesday 18 March 2009 03:00:07 Ralf Wildenhues wrote:
> >
> > IIRC lots of things would break on Linux if we used -Wl,--no-undefined.
> > I don't recall the details, but I'm sure glibc wasn't the only problem
> > child in this area.
>
> rather than make it the default, i would expect the flag to only show
> up when people have explicitly done -no-undefined.
Yes, that's what I meant. Sorry for not being explicit.
> the breakage there shouldnt be too bad right ?
Well, lots of packages that have been ported to w32 use -no-undefined on
all systems, as Eric already noted. Generally works ok, though IIRC it
was pretty guaranteed to break on GNU/Linux due to support library
issues. I don't recall whether that was glibc only, or GCC stuff as
well. But anyway we need to collect data on such a change.
> > Before we do this, I'd like to see some real-world exposure of it, say,
> > using it to build the better part of a distribution or so. Running the
> > Libtool testsuite with it would be a good starter. :-)
>
> i dont have a problem running it on my Gentoo systems ... pretty easy to
> rebuild quite a bit of packages there
Well that would be very nice if you could try that.
> but a patch would be needed first ... there's the previous one in the
> archives
> that was ported to libtool-1.5 ...
Do you have a URL handy? Anyway, should be little more than this patch,
I guess.
Thanks,
Ralf
Enable -Wl,--no-undefined on GNU/Linux.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [linux]
<no_undefined_flag>: Set to `${wl}--no-undefined'.
Suggestion by Mike Frysinger.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index b6f9f06..c8ab17d 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -4311,6 +4311,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}--no-undefined'
tmp_addflag=
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in