svn commit: r284356 - head/usr.sbin/crunch/crunchgen

Adrian Chadd adrian at freebsd.org
Sun Jun 14 15:07:19 UTC 2015


On 14 June 2015 at 02:41, Tijl Coosemans <tijl at freebsd.org> wrote:
> On Sat, 13 Jun 2015 22:01:21 +0000 (UTC) Adrian Chadd <adrian at FreeBSD.org> wrote:
>> Author: adrian
>> Date: Sat Jun 13 22:01:21 2015
>> New Revision: 284356
>> URL: https://svnweb.freebsd.org/changeset/base/284356
>>
>> Log:
>>   Fix up crunchgen binary generation to work with external cross-build
>>   tools.
>>
>>   * Allow STRIP to be overridden by the environment
>>   * Use CC to tie things together, not LD
>>
>>   Tested:
>>
>>   * i386, mips32
>>
>>   Submitted by:       kan
>>
>> Modified:
>>   head/usr.sbin/crunch/crunchgen/crunchgen.c
>>
>> Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c
>> ==============================================================================
>> --- 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;
>>
>>       fprintf(outmk, "LD?= ld\n");
>> +     fprintf(outmk, "STRIP?= strip\n");
>>       if ( subtract_strlst(&libs, &libs_so) )
>>               fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by LIBS_SO\n");
>>
>> @@ -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
>>               fprintf(outmk, " $(%s_LIBS)", p->ident);
>>
>>       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_OBJPATHS)",
>
> Does CC understand -dc and -r?

Apparently?



-a


More information about the svn-src-all mailing list