Re: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv

2020-06-26 Thread John Baldwin
On 6/25/20 5:25 PM, Peter Jeremy wrote:
> On 2020-Jun-24 17:54:25 +, John Baldwin  wrote:
>> Author: jhb
>> Date: Wed Jun 24 17:54:24 2020
>> New Revision: 362589
>> URL: https://svnweb.freebsd.org/changeset/base/362589
>>
>> Log:
>>  Always compile the brand and ignore init ELF notes standalone.
> 
> I'm not sure if this is self-inflicted but I'm now seeing linker failures
> trying to build in /usr/src/lib/csu/aarch64:
> ld  -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s
> ld: error: Scrt1.s:1: unknown directive: .text
 .text
  ^
> *** Error code 1
> 
> This is running r362580 and trying to buildworld r352310 on arm64.

Ah, I will fix.  I have to use ${.ALLSRC:M*.o} instead of ${.ALLSRC} as
bmake adds implicit dependencies in ${.ALLSRC}.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv

2020-06-25 Thread Peter Jeremy
On 2020-Jun-26 10:25:36 +1000, Peter Jeremy  wrote:
>On 2020-Jun-24 17:54:25 +, John Baldwin  wrote:
>>Author: jhb
>>Date: Wed Jun 24 17:54:24 2020
>>New Revision: 362589
>>URL: https://svnweb.freebsd.org/changeset/base/362589
>>
>>Log:
>>  Always compile the brand and ignore init ELF notes standalone.
>
>I'm not sure if this is self-inflicted but I'm now seeing linker failures
>trying to build in /usr/src/lib/csu/aarch64:
>ld  -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s
>ld: error: Scrt1.s:1: unknown directive: .text
 .text
  ^
>*** Error code 1
>
>This is running r362580 and trying to buildworld r352310 on arm64.

Sorry - that latter revision is obviously wrong.  I was building r362612.

-- 
Peter Jeremy


signature.asc
Description: PGP signature


Re: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv

2020-06-25 Thread Peter Jeremy
On 2020-Jun-24 17:54:25 +, John Baldwin  wrote:
>Author: jhb
>Date: Wed Jun 24 17:54:24 2020
>New Revision: 362589
>URL: https://svnweb.freebsd.org/changeset/base/362589
>
>Log:
>  Always compile the brand and ignore init ELF notes standalone.

I'm not sure if this is self-inflicted but I'm now seeing linker failures
trying to build in /usr/src/lib/csu/aarch64:
ld  -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s
ld: error: Scrt1.s:1: unknown directive: .text
>>> .text
>>>  ^
*** Error code 1

This is running r362580 and trying to buildworld r352310 on arm64.

-- 
Peter Jeremy


signature.asc
Description: PGP signature


svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv

2020-06-24 Thread John Baldwin
Author: jhb
Date: Wed Jun 24 17:54:24 2020
New Revision: 362589
URL: https://svnweb.freebsd.org/changeset/base/362589

Log:
  Always compile the brand and ignore init ELF notes standalone.
  
  Reviewed by:  kib
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D25374

Modified:
  head/lib/csu/aarch64/Makefile
  head/lib/csu/aarch64/crt1_s.S
  head/lib/csu/arm/Makefile
  head/lib/csu/arm/crt1_s.S
  head/lib/csu/i386/Makefile
  head/lib/csu/i386/crt1_s.S
  head/lib/csu/riscv/Makefile
  head/lib/csu/riscv/crt1_s.S

Modified: head/lib/csu/aarch64/Makefile
==
--- head/lib/csu/aarch64/Makefile   Wed Jun 24 17:31:21 2020
(r362588)
+++ head/lib/csu/aarch64/Makefile   Wed Jun 24 17:54:24 2020
(r362589)
@@ -18,20 +18,21 @@ FILESDIR=   ${LIBDIR}
 .undef LIBRARIES_ONLY
 
 CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
+CLEANFILES+=   crtbrand.o ignore_init_note.o
 
 gcrt1_c.o: crt1_c.c
${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-gcrt1.o: gcrt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
+gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
-crt1.o:crt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o
+crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
 Scrt1_c.o: crt1_c.c
${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-Scrt1.o: Scrt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o
+Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
 .include 

Modified: head/lib/csu/aarch64/crt1_s.S
==
--- head/lib/csu/aarch64/crt1_s.S   Wed Jun 24 17:31:21 2020
(r362588)
+++ head/lib/csu/aarch64/crt1_s.S   Wed Jun 24 17:54:24 2020
(r362589)
@@ -32,9 +32,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "crtbrand.S"
-#include "ignore_init_note.S"
-
 ENTRY(_start)
mov x3, x2  /* cleanup */
add x1, x0, #8  /* load argv */

Modified: head/lib/csu/arm/Makefile
==
--- head/lib/csu/arm/Makefile   Wed Jun 24 17:31:21 2020(r362588)
+++ head/lib/csu/arm/Makefile   Wed Jun 24 17:54:24 2020(r362589)
@@ -18,23 +18,24 @@ FILESDIR=   ${LIBDIR}
 .undef LIBRARIES_ONLY
 
 CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
+CLEANFILES+=   crtbrand.o ignore_init_note.o
 
 crt1_c.o: crt1_c.c
${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-crt1.o:crt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o
+crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
 gcrt1_c.o: crt1_c.c
${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} 
${.CURDIR}/crt1_c.c
 
-gcrt1.o: gcrt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
+gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
 Scrt1_c.o: crt1_c.c
${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-Scrt1.o: Scrt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o
+Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
 .include 

Modified: head/lib/csu/arm/crt1_s.S
==
--- head/lib/csu/arm/crt1_s.S   Wed Jun 24 17:31:21 2020(r362588)
+++ head/lib/csu/arm/crt1_s.S   Wed Jun 24 17:54:24 2020(r362589)
@@ -44,8 +44,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "crtbrand.S"
-#include "ignore_init_note.S"
+#include 
+#include 
+#include "notes.h"
 
 ENTRY(_start)
mov r5, r2  /* cleanup */

Modified: head/lib/csu/i386/Makefile
==
--- head/lib/csu/i386/Makefile  Wed Jun 24 17:31:21 2020(r362588)
+++ head/lib/csu/i386/Makefile  Wed Jun 24 17:54:24 2020(r362589)
@@ -18,22 +18,23 @@ FILESDIR=   ${LIBDIR}
 .undef LIBRARIES_ONLY
 
 CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
+CLEANFILES+=   crtbrand.o ignore_init_note.o
 
 gcrt1_c.o: crt1_c.c
${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
 
-gcrt1.o: gcrt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
+gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o
+   ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC}
 
-crt1.o:crt1_c.o crt1_s.o
-   ${LD} ${_LDFLAGS} -o crt1.o -r