NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/41503: netbsd-5 LDSTATIC=-static amd build does not



The following reply was made to PR bin/41503; it has been noted by GNATS.

From: "Greg A. Woods" <woods%planix.com@localhost>
To: NetBSD GNATS <gnats-bugs%NetBSD.org@localhost>
Cc: Hauke Fath <hf%spg.tu-darmstadt.de@localhost>
Subject: Re: bin/41503: netbsd-5 LDSTATIC=-static amd build does not
Date: Fri, 29 May 2009 18:42:48 -0400

 --pgp-sign-Multipart_Fri_May_29_18:42:48_2009-1
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 At Fri, 29 May 2009 08:20:01 +0000 (UTC), Hauke Fath 
<hf%spg.tu-darmstadt.d@localhost=
 e> wrote:
 Subject: bin/41503: netbsd-5 LDSTATIC=3D-static amd build does not
 >=20
 >      A build.sh run with LDSTATIC=3D-static (mac68k cross-build here,
 >      but doesn't really make a difference) fails to build amd(8)
 >      with
 
 Somewhere along the line there's a linker flag being added telling it to
 die on the warnings:
 
        -Wl,--fatal-warnings
 =20
 It shouldn't be coming from bsd.sys.mk though:
 
        # Set linker warnings to be fatal
        # XXX no proper way to avoid "FOO is a patented algorithm" warnings
        # XXX on linking static libs
        .if (!defined(MKPIC) || ${MKPIC} !=3D "no") && \
            (!defined(LDSTATIC) || ${LDSTATIC} !=3D "-static")
        LDFLAGS+=3D       -Wl,--fatal-warnings
        .endif
        .endif
 
 unless somehow LDSTATIC isn't seen to be set as a make variable at the
 right place....
 
 Maybe if you move the LDSTATIC=3D-static setting into /etc/mk.conf instead
 of setting it in build.sh's environment?  LDSTATIC isn't directly
 supported by build.sh, for what it's worth.  Also, FYI, I use "env -i"
 in my wrapper to build.sh as otherwise reproducible builds can be much
 more difficult to achieve:
 
        # make sure we start out with a very clean environment!
        if [ x"$_MY_BUILD_CLEAN" !=3D x"true" ]; then
                exec env -i USER=3D${USER} SHELL=3D/bin/ksh 
_MY_BUILD_CLEAN=3Dtrue "$0" $=
 {1+"$@"}
        fi
 
 Try checking all the various relevant make variables after moving
 LDSTATIC=3D-static to /etc/mk.conf, like this
 
     18:36 [298] $ pwd
     /usr/src-current/external/bsd/am-utils/bin/amd
     18:37 [299] $ nbmake-i386 -V LDFLAGS    =20
     ${LDFLAGS.amd}
     18:37 [300] $ nbmake-i386 -V LDFLAGS.amd=20
    =20
     18:37 [301] $ nbmake-i386 -V LDSTATIC   =20
     -static
     18:38 [302] $=20
 
 I don't build amd myself (MKAMD=3Dno), but I'm sure other programs I do
 build would encounter the same problem, and as shown above for me
 LDSTATIC=3D-static somehow does prevent setting LDFLAGS with the fatal
 warning option.
 
 --=20
                                                Greg A. Woods
                                                Planix, Inc.
 
 <woods%planix.com@localhost>       +1 416 218-0099        
http://www.planix.com/
 
 --pgp-sign-Multipart_Fri_May_29_18:42:48_2009-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (NetBSD)
 
 iD8DBQBKIGToZn1xt3i/9H8RAom3AKDn9+cUakGF/8V7Y+NEJqur5CHdAQCgjrZ2
 +nbZ1Fr8/tdfL9svvNEcqcE=
 =ydGt
 -----END PGP SIGNATURE-----
 
 --pgp-sign-Multipart_Fri_May_29_18:42:48_2009-1--
 


Home | Main Index | Thread Index | Old Index