19990517 compiles and tests okay.

The recent changes to collect2 (needed by java) mean ldd must be updated,
the Makefile now checks for that problem.
This commit is contained in:
espie 1999-05-18 17:07:16 +00:00
parent c160b36e01
commit 1753c0da02
4 changed files with 98 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.44 1999/05/14 01:15:29 espie Exp $
# $OpenBSD: Makefile,v 1.45 1999/05/18 17:07:16 espie Exp $
# This is a configuration file for egcs, snapshot flavor
# PLEASE use the regular egcs-stable for serious work, resort to this one
@ -46,7 +46,7 @@ BUILD_DEPENDS+= runtest:${PORTSDIR}/devel/dejagnu
ONE_ARCHIVE=yes
LATEST_DATE=1999-05-02
LATEST_DATE=1999-05-17
#### fetch section
# configuration is built so that you can test the next snapshot easily,
@ -54,7 +54,7 @@ LATEST_DATE=1999-05-02
# You also may have to remove/add some patches, as these things ARE
# usually passed along to the egcs ml.
#NEXT_DATE=1999-05-02
#NEXT_DATE=1999-05-17
#PATCH_DEBUG=yes
LATEST != echo ${LATEST_DATE} | sed -e s/-//g;
@ -201,11 +201,16 @@ SUPPATCHFILES+=egcs-${sub}-${LATEST}-${NEXT}.diff.gz
.endif
# Misc bug sections
.if (${MACHINE_ARCH} == "i386")
pre-fetch:
.if (${MACHINE_ARCH} == "i386")
@(cd /tmp && /usr/bin/as -k ${FILESDIR}/gas-bug/test-i386-gas.s) || \
(${ECHO} "Your gas has a bug, see ${FILESDIR}/gas-bug for details"; ${FALSE})
.endif
@if [ -f /usr/lib/libc.so.* ]; \
then \
ldd /usr/lib/libc.so.* 2>/dev/null || \
(${ECHO} "Your ldd must be patched, see ${FILESDIR}/ldd-patch"; ${FALSE}) \
fi
makesum:

View File

@ -0,0 +1,40 @@
With this small patch, ldd does shut up (somewhat) when faced with
dynamic libraries.
The reason is that, when you build a dynamic library through gcc standard
interface, collect2 will try to invoke ldd on dynamic libraries
(which ldd should handle, but doesn't right now), and will abort if ldd
returns 1.
So we warn, but let ldd return 0 in such a case.
Index: ldd.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/ld/ldd/ldd.c,v
retrieving revision 1.4
diff -u -r1.4 ldd.c
--- ldd.c 1998/03/26 19:46:55 1.4
+++ ldd.c 1999/05/18 15:28:16
@@ -105,8 +105,20 @@
argv++;
continue;
}
- if (read(fd, &hdr, sizeof hdr) != sizeof hdr
- || (N_GETFLAG(hdr) & EX_DPMASK) != EX_DYNAMIC
+ if (read(fd, &hdr, sizeof hdr) != sizeof hdr) {
+ warnx("%s: not a dynamic executable", *argv);
+ (void)close(fd);
+ rval |= 1;
+ argv++;
+ continue;
+ }
+ if ((N_GETFLAG(hdr) & EX_DPMASK) == (EX_DYNAMIC | EX_PIC)) {
+ warnx("%s: no support for dynamic libraries", *argv);
+ (void)close(fd);
+ argv++;
+ continue;
+ }
+ if ((N_GETFLAG(hdr) & EX_DPMASK) != EX_DYNAMIC
#if 1 /* Compatibility */
|| hdr.a_entry < N_PAGSIZ(hdr)
#endif

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.44 1999/05/14 01:15:29 espie Exp $
# $OpenBSD: Makefile,v 1.45 1999/05/18 17:07:16 espie Exp $
# This is a configuration file for egcs, snapshot flavor
# PLEASE use the regular egcs-stable for serious work, resort to this one
@ -46,7 +46,7 @@ BUILD_DEPENDS+= runtest:${PORTSDIR}/devel/dejagnu
ONE_ARCHIVE=yes
LATEST_DATE=1999-05-02
LATEST_DATE=1999-05-17
#### fetch section
# configuration is built so that you can test the next snapshot easily,
@ -54,7 +54,7 @@ LATEST_DATE=1999-05-02
# You also may have to remove/add some patches, as these things ARE
# usually passed along to the egcs ml.
#NEXT_DATE=1999-05-02
#NEXT_DATE=1999-05-17
#PATCH_DEBUG=yes
LATEST != echo ${LATEST_DATE} | sed -e s/-//g;
@ -201,11 +201,16 @@ SUPPATCHFILES+=egcs-${sub}-${LATEST}-${NEXT}.diff.gz
.endif
# Misc bug sections
.if (${MACHINE_ARCH} == "i386")
pre-fetch:
.if (${MACHINE_ARCH} == "i386")
@(cd /tmp && /usr/bin/as -k ${FILESDIR}/gas-bug/test-i386-gas.s) || \
(${ECHO} "Your gas has a bug, see ${FILESDIR}/gas-bug for details"; ${FALSE})
.endif
@if [ -f /usr/lib/libc.so.* ]; \
then \
ldd /usr/lib/libc.so.* 2>/dev/null || \
(${ECHO} "Your ldd must be patched, see ${FILESDIR}/ldd-patch"; ${FALSE}) \
fi
makesum:

View File

@ -0,0 +1,40 @@
With this small patch, ldd does shut up (somewhat) when faced with
dynamic libraries.
The reason is that, when you build a dynamic library through gcc standard
interface, collect2 will try to invoke ldd on dynamic libraries
(which ldd should handle, but doesn't right now), and will abort if ldd
returns 1.
So we warn, but let ldd return 0 in such a case.
Index: ldd.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/ld/ldd/ldd.c,v
retrieving revision 1.4
diff -u -r1.4 ldd.c
--- ldd.c 1998/03/26 19:46:55 1.4
+++ ldd.c 1999/05/18 15:28:16
@@ -105,8 +105,20 @@
argv++;
continue;
}
- if (read(fd, &hdr, sizeof hdr) != sizeof hdr
- || (N_GETFLAG(hdr) & EX_DPMASK) != EX_DYNAMIC
+ if (read(fd, &hdr, sizeof hdr) != sizeof hdr) {
+ warnx("%s: not a dynamic executable", *argv);
+ (void)close(fd);
+ rval |= 1;
+ argv++;
+ continue;
+ }
+ if ((N_GETFLAG(hdr) & EX_DPMASK) == (EX_DYNAMIC | EX_PIC)) {
+ warnx("%s: no support for dynamic libraries", *argv);
+ (void)close(fd);
+ argv++;
+ continue;
+ }
+ if ((N_GETFLAG(hdr) & EX_DPMASK) != EX_DYNAMIC
#if 1 /* Compatibility */
|| hdr.a_entry < N_PAGSIZ(hdr)
#endif