Date: Tue, 28 Jul 2015 14:20:01 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Adrian Chadd <adrian@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284356 - head/usr.sbin/crunch/crunchgen Message-ID: <55B7F201.2040305@FreeBSD.org> In-Reply-To: <201506132201.t5DM1LCV025599@svn.freebsd.org> References: <201506132201.t5DM1LCV025599@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/13/15 3:01 PM, Adrian Chadd wrote: > Author: adrian > Date: Sat Jun 13 22:01:21 2015 > New Revision: 284356 > URL: https://svnweb.freebsd.org/changeset/base/284356 >=20 > Log: > Fix up crunchgen binary generation to work with external cross-build > tools. > =20 > * Allow STRIP to be overridden by the environment This change breaks the the build still. The build uses STRIP as the parameter for install(1), i.e., -s or blank. Once you rebuild usr.sbin/crunch/crunchgen with this change and then build rescue/rescue with 'make STRIP=3D' the following is encountered: rescue sh: rescue: not found *** [rescue] Error code 127 make[1]: stopped in /usr/obj/root/svn/base/rescue/rescue I would suggest changing the name of this, perhaps STRIP_CMD as ports has, or using a different mechanism. Side note, something funky is going on with including /etc/make.conf. When I build with buildworld (clean) I get the error, but not a plain 'make' having STRIP=3D in /etc/make.conf for both. My system is pre-meta-mode merge at r280911. > * Use CC to tie things together, not LD > =20 > Tested: > =20 > * i386, mips32 > =20 > Submitted by: kan >=20 > Modified: > head/usr.sbin/crunch/crunchgen/crunchgen.c >=20 > Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 20:15:44 2015= (r284355) > +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 22:01:21 2015= (r284356) > @@ -980,6 +980,7 @@ top_makefile_rules(FILE *outmk) > prog_t *p; > =20 > fprintf(outmk, "LD?=3D ld\n"); > + fprintf(outmk, "STRIP?=3D strip\n"); > if ( subtract_strlst(&libs, &libs_so) ) > fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by L= IBS_SO\n"); > =20 > @@ -1027,7 +1028,7 @@ top_makefile_rules(FILE *outmk) > fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n= ", > execfname, execfname); > fprintf(outmk, ".endif\n"); > - fprintf(outmk, "\tstrip %s\n", execfname); > + fprintf(outmk, "\t$(STRIP) %s\n", execfname); > fprintf(outmk, "realclean: clean subclean\n"); > fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname); > fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n"); > @@ -1109,7 +1110,7 @@ prog_makefile_rules(FILE *outmk, prog_t=20 > fprintf(outmk, " $(%s_LIBS)", p->ident); > =20 > fprintf(outmk, "\n"); > - fprintf(outmk, "\t$(LD) -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)", > + fprintf(outmk, "\t$(CC) -nostdlibs -dc -r -o %s.lo %s_stub.o $(%s_OBJ= PATHS)", > p->name, p->name, p->ident); > if (p->libs) > fprintf(outmk, " $(%s_LIBS)", p->ident); >=20 --=20 Regards, Bryan Drewery
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55B7F201.2040305>