Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2013 09:51:10 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Glen Barber <gjb@FreeBSD.org>
Cc:        freebsd-current@freebsd.org, peter@freebsd.org
Subject:   Re: Buildworld broken with WITHOUT_DYNAMICROOT=yes in src.conf
Message-ID:  <20131125075110.GL59496@kib.kiev.ua>
In-Reply-To: <20131125044854.GC2310@glenbarber.us>
References:  <201311250111.rAP1BuI0009520@pozo.com> <20131125011949.GC1627@glenbarber.us> <20131125012302.GD1627@glenbarber.us> <201311250129.rAP1TJfQ033437@pozo.com> <20131125041724.GA2310@glenbarber.us> <201311250441.rAP4freb002330@pozo.com> <20131125044854.GC2310@glenbarber.us>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Sun, Nov 24, 2013 at 11:48:54PM -0500, Glen Barber wrote:
> On Sun, Nov 24, 2013 at 08:41:48PM -0800, Manfred Antar wrote:
> > At 08:17 PM 11/24/2013, Glen Barber wrote:
> > >On Sun, Nov 24, 2013 at 05:29:14PM -0800, Manfred Antar wrote:
> > >> adding -lc_nonshared to LAAD enables me to build /bin and /sbin statically
> > >> /bin/csh/Makefile was the only one I had to change all the rest of /bin and /sbin built fine
> > >> 
> > >
> > >Hmm, I'm not sure if bin/csh/ should require -c_nonshared
> > >unconditionally.
> > >
> > >I've done some testing with WITHOUT_DYNAMICROOT=1, WITHOUT_ICONV=1,
> > >WITH_ICONV=1, WITH_DYNAMICROOT=1, and am getting different results with
> > >regard to what iconv_*() are included...
> > >
> > >Glen
> > >
> > >
> > 
> > I  think it only needs it if you want a static csh.
> > my src.conf :
> > 
> > #WITHOUT_DYNAMICROOT=yes 
> > WITH_IDEA=yes
> > # Don't die on warnings
> > NO_WERROR=
> > WERROR=
> > WITH_GCC=yes
> > WITH_GNUCXX=yes
> > 
> > can you some kind of conditional
> > 
> > if WITHOUT_DYNAMICROOT=yes then LADD+= -lc_nonshared 
> > 
> 
> Yes, that is what I am doing, but also getting unexpected results.
> 
> Latest diff I tried is:
> 
> Index: Makefile
> ===================================================================
> --- Makefile      (revision 258538)
> +++ Makefile      (working copy)
> @@ -42,6 +42,9 @@
>  
>  DPADD=	${LIBTERMCAP} ${LIBCRYPT}
>  LDADD=	-ltermcap -lcrypt
> +.if ${MK_ICONV} != "no" && ${MK_DYNAMICROOT} != "yes"
> +LDADD+=    -lc_nonshared
> +.endif
>     
>  LINKS=	${BINDIR}/csh ${BINDIR}/tcsh
>       

No, this is wrong.  As is, static linking is broken and the hack above
only fixes one case.

What is needed is inclusion of the lib/libc_nonshared object files into
static libc.a.  I am not sure how to express this in our build system.

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAEBAgAGBQJSkwFtAAoJEJDCuSvBvK1BfYUQAImcyOwRPjO/FY47AFfwkBqD
DPAuQ/AQHtoAY5Pg9aQSEiydgZGoWeBVTcujpQKJBFcMJC3sHN3oAxOQuJvze9el
Cfp/kX3CntgI73Kzajq0E7h9D8s1wpfM2hprWpQOKaQWZ2Iu1qgluypuvf2oBd3O
yR8xgHQOtT1z35jvsaLHPQP5Fcoyx4onL2izOaVpl15b8blgeZchip73g8iqhHOO
Osr+syfmc58ncNnX7aOuS8ik+Z0Mb0tu8KW0cN2FjoyhxGR1u0HXeVrTQxCieJZ6
CuBVBrhpUDvVF2ZNGE/t83DyB9QhkbyCWXRUGCj+koW0Hl2AV68asBxYHQDqXSJ7
a9IciuK/Ms1wp/TIYUsLKTpwOMx0eymakPYG7GWu5gT4pDo4fSqFB+XpBvxN8R7m
dh86gSC2WgnU1FN1EupFHN8lw4idSkJTvQsxAcHGiKwUbNi+lJYesxXlban2QE2K
yyq8V57PBgpdNxYVUBKZ7YkDXPA3ihCMJWjbz3FouSPFEVDTbBmCM3Kgiaf/UcQt
R8QSseOvnk3Qiv+C8VOA4wJuXuC3trodoUvFlyQF2MaQgGCJnwViFOtRKI3sj5Cg
VlrarJRZRF6vJuWzE1UXnVH2pfnqKLQWEUwifEZgxqymJBJHo/7jFgk8xs0W148C
tA5Oe5r/sl+HAxLcAFru
=Y45F
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131125075110.GL59496>