Page MenuHomeFreeBSD

D31323.diff
No OneTemporary

D31323.diff

Index: lib/csu/Makefile.inc
===================================================================
--- lib/csu/Makefile.inc
+++ lib/csu/Makefile.inc
@@ -13,7 +13,7 @@
OBJS+= crtend.o crtendS.o
OBJS+= crti.o crtn.o
-CRT1OBJS+= crtbrand.o feature_note.o ignore_init_note.o
+CRT1OBJS+= feature_note.o ignore_init_note.o
ACFLAGS+= -DLOCORE
@@ -33,6 +33,7 @@
.undef LIBRARIES_ONLY
CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o
+CLEANFILES+= crtbrand.o crtbegin_c.o crtbeginS_c.o crtbeginT_c.o
CLEANFILES+= crti_s.o
crt1.o: crt1_c.o ${CRT1OBJS}
@@ -56,25 +57,28 @@
${OBJCOPY} --localize-symbol _start1 ${.TARGET}
.endif
-crtbegin.o: crtbegin.c
-crtbeginS.o: crtbegin.c
-crtbeginT.o: crtbegin.c
+crtbegin_c.o: crtbegin.c
+crtbeginS_c.o: crtbegin.c
+crtbeginT_c.o: crtbegin.c
+crtbegin.o: crtbegin_c.o crtbrand.o
+crtbeginS.o: crtbeginS_c.o crtbrand.o
+crtbeginT.o: crtbeginT_c.o crtbrand.o
crtend.o: crtend.c
crtendS.o: crtend.c
-crtbegin.o crtend.o crtbeginT.o:
+crtbegin_c.o crtend.o crtbeginT_c.o:
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
-crtbeginS.o crtendS.o:
+crtbeginS_c.o crtendS.o:
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \
${.ALLSRC:N*.h:[1]}
-crti_s.o: crti.S
- ${CC} ${CFLAGS} ${ACFLAGS} -c ${.ALLSRC:M*.S} -o ${.TARGET}
-
-crti.o: crti_s.o crtbrand.o
+crtbegin.o crtbeginS.o crtbeginT.o:
${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o}
+crti.o: crti.S
+ ${CC} ${CFLAGS} ${ACFLAGS} -c ${.ALLSRC:M*.S} -o ${.TARGET}
+
.endif
.include "../Makefile.inc"
Index: lib/csu/common/crtbrand.S
===================================================================
--- lib/csu/common/crtbrand.S
+++ lib/csu/common/crtbrand.S
@@ -38,7 +38,7 @@
* for more information.
*/
- .section .note.tag,"aG",%note,.freebsd.noteG,comdat
+ .section .note.tag,"a",%note
.p2align 2
.4byte 2f-1f
.4byte 4f-3f
Index: tools/build/depend-cleanup.sh
===================================================================
--- tools/build/depend-cleanup.sh
+++ tools/build/depend-cleanup.sh
@@ -73,3 +73,17 @@
# 20210608 f20893853e8e move from atomic.S to atomic.c
clean_dep cddl/lib/libspl atomic S
+
+# YYYYMMDD XXXXXXXXXXXX crtbrand moved from crt1 and crti to crtbegin
+for OBJ in "" obj-lib32; do
+ if [ -d "$OBJTOP"/$OBJ/lib/csu ]; then
+ for ARCH in $(ls "$OBJTOP"/$OBJ/lib/csu | grep -v tests); do
+ if [ -e "$OBJTOP"/$OBJ/lib/csu/$ARCH/.depend.crtbegin.o ] && \
+ egrep -qw "lib/csu/common/crtbegin\.c" \
+ "$OBJTOP"/$OBJ/lib/csu/$ARCH/.depend.crtbegin.o; then
+ echo "Removing old $ARCH CSU tree"
+ rm -rf "$OBJTOP"/$OBJ/lib/csu/$ARCH
+ fi
+ done
+ fi
+done

File Metadata

Mime Type
text/plain
Expires
Wed, Jun 24, 9:44 AM (3 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34279745
Default Alt Text
D31323.diff (2 KB)

Event Timeline