From owner-svn-src-stable@FreeBSD.ORG Fri Apr 27 06:49:36 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F741065674; Fri, 27 Apr 2012 06:49:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507C78FC14; Fri, 27 Apr 2012 06:49:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3R6nakh091167; Fri, 27 Apr 2012 06:49:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3R6naCt091159; Fri, 27 Apr 2012 06:49:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204270649.q3R6naCt091159@svn.freebsd.org> From: Dimitry Andric Date: Fri, 27 Apr 2012 06:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234726 - in stable/9/lib/csu: amd64 arm i386-elf ia64 mips powerpc powerpc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 06:49:36 -0000 Author: dim Date: Fri Apr 27 06:49:35 2012 New Revision: 234726 URL: http://svn.freebsd.org/changeset/base/234726 Log: MFC r234502: After r217375, some startup objects under lib/csu are built in a special way: first they are compiled to assembly, then some sed'ing is done on the assembly, and lastly the assembly is compiled to an object file. This last step is done using ${CC}, and not ${AS}, because when the compiler is clang, it outputs directives that are too advanced for our old gas. So we use clang's integrated assembler instead. (When the compiler is gcc, it just calls gas, and nothing is different, except one extra fork.) However, in the .s to .o rules in lib/csu/$ARCH/Makefile, I still passed CFLAGS to the compiler, instead of ACFLAGS, which are specifically for compiling .s files. In case you are using '-g' for debug info anywhere in your CFLAGS, it causes the .s files to already contain debug information in the assembly itself. In the next step, the .s files are also compiled using '-g', and if the compiler is clang, it complains: "error: input can't have .file dwarf directives when -g is used to generate dwarf debug info for assembly code". Fix this by using ${ACFLAGS} for compiling the .s files instead. Reported by: jasone Modified: stable/9/lib/csu/amd64/Makefile stable/9/lib/csu/arm/Makefile stable/9/lib/csu/i386-elf/Makefile stable/9/lib/csu/ia64/Makefile stable/9/lib/csu/mips/Makefile stable/9/lib/csu/powerpc/Makefile stable/9/lib/csu/powerpc64/Makefile Directory Properties: stable/9/lib/csu/ (props changed) Modified: stable/9/lib/csu/amd64/Makefile ============================================================================== --- stable/9/lib/csu/amd64/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/amd64/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -22,21 +22,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/arm/Makefile ============================================================================== --- stable/9/lib/csu/arm/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/arm/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/i386-elf/Makefile ============================================================================== --- stable/9/lib/csu/i386-elf/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/i386-elf/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,7 +21,7 @@ gcrt1_c.s: crt1_c.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1_c.o: gcrt1_c.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1_c.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1_c.s gcrt1.o: gcrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o @@ -31,7 +31,7 @@ crt1_c.s: crt1_c.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1_c.o: crt1_c.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1_c.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1_c.s crt1.o: crt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o @@ -42,7 +42,7 @@ Scrt1_c.s: crt1_c.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1_c.o: Scrt1_c.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1_c.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1_c.s Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o Modified: stable/9/lib/csu/ia64/Makefile ============================================================================== --- stable/9/lib/csu/ia64/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/ia64/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -24,7 +24,7 @@ crtbrand.s: crtbrand.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crtbrand.o: crtbrand.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crtbrand.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crtbrand.s crt1.o: crt1_.o crtbrand.o ${LD} ${LDFLAGS} -r -o ${.TARGET} crt1_.o crtbrand.o @@ -37,7 +37,7 @@ gcrtbrand.s: crtbrand.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrtbrand.o: gcrtbrand.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrtbrand.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrtbrand.s gcrt1.o: gcrt1_.o gcrtbrand.o ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} @@ -50,7 +50,7 @@ Scrtbrand.s: crtbrand.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrtbrand.o: Scrtbrand.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrtbrand.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrtbrand.s Scrt1.o: Scrt1_.o Scrtbrand.o ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} Modified: stable/9/lib/csu/mips/Makefile ============================================================================== --- stable/9/lib/csu/mips/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/mips/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/powerpc/Makefile ============================================================================== --- stable/9/lib/csu/powerpc/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/powerpc/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/powerpc64/Makefile ============================================================================== --- stable/9/lib/csu/powerpc64/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/powerpc64/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \