Hi,

For a week or so, AOUT library of -current is broken.
"make -DWANT_AOUT world" fails at the following point:
-------- log starts here --------
--------------------------------------------------------------
>>> Building legacy libraries
--------------------------------------------------------------
[snip]
cd /usr/src/lib/libncurses;  /usr/obj/usr/src/tmp/usr/bin/make -DWORLD \
  -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED cleandepend;  \
  /usr/obj/usr/src/tmp/usr/bin/make -DWORLD -DNOINFO -DNOMAN -DNOPIC \
  -DNOPROFILE -DNOSHARED all;  /usr/obj/usr/src/tmp/usr/bin/make -DWORLD \
  -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED -B install cleandir obj
[snip]
cc -o make_keys -O2 -m486 -pipe -I. -I/usr/src/lib/libncurses \
  -I/usr/src/lib/libncurses/../../contrib/ncurses/ncurses \
  -I/usr/src/lib/libncurses/../../contrib/ncurses/include -Wall \
  -DFREEBSD_NATIVE -DNDEBUG -DHAVE_CONFIG_H -DTERMIOS \
  -I/usr/obj/aout/usr/src/tmp/usr/include \
  /usr/src/lib/libncurses/../../contrib/ncurses/ncurses/tinfo/make_keys.c
__main.o: Undefined symbol `___do_global_ctors' referenced from text segment
*** Error code 1
--------  log ends here ---------

This error occurs because ___do_global_ctors does not exists in libgcc.a.
So, I think the following patch will be needed for -current.

-------- patch begins here --------
--- contrib/gcc/libgcc2.c.old   Wed Oct 27 18:45:47 1999
+++ contrib/gcc/libgcc2.c       Mon Dec  6 00:50:25 1999
@@ -2853,7 +2853,7 @@
 }
 #endif
 
-#ifndef HAS_INIT_SECTION
+#if !defined (HAS_INIT_SECTION) || !defined (OBJECT_FORMAT_ELF)
 /* Run all the global constructors on entry to the program.  */
 
 #ifndef ON_EXIT
@@ -2917,7 +2917,7 @@
    must be in the bss/common section.
 
    Long term no port should use those extensions.  But many still do.  */
-#if !defined(INIT_SECTION_ASM_OP) && !defined(CTOR_LISTS_DEFINED_EXTERNALLY)
+#if (!defined(INIT_SECTION_ASM_OP) || !defined(OBJECT_FORMAT_ELF)) && 
+!defined(CTOR_LISTS_DEFINED_EXTERNALLY)
 #if defined (ASM_OUTPUT_CONSTRUCTOR) || defined (USE_COLLECT2)
 func_ptr __CTOR_LIST__[2] = {0, 0};
 func_ptr __DTOR_LIST__[2] = {0, 0};
--- contrib/gcc/config/i386/freebsd.h.old       Sat Oct 16 05:56:19 1999
+++ contrib/gcc/config/i386/freebsd.h   Mon Dec  6 00:38:30 1999
@@ -557,3 +557,8 @@
    the EGCS crtstuff.c is overcome, we will switch to the non-sjlj-exceptions 
    type exception machanism.  */
 #define DWARF2_UNWIND_INFO 0
+
+/* to assist building libgcc2.c */
+#ifndef __ELF__
+#undef OBJECT_FORMAT_ELF
+#endif

--------  patch ends here  --------


Since -mno-486 option of gcc is deleted, the following patch also needed
for "make -DWANT_AOUT world".

-------- patch begins here --------
--- sys/i386/boot/biosboot/Makefile.old Mon Dec  6 01:27:59 1999
+++ sys/i386/boot/biosboot/Makefile     Sat Aug 28 09:43:09 1999
@@ -8,7 +8,7 @@
 
 BINMODE=       444
 CFLAGS=                -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
-               -m386 \
+               -mno-486 \
                -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
 CFLAGS+=       -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
 CFLAGS+=       -DDO_BAD144
--- sys/i386/boot/cdboot/Makefile.old   Sat Aug 28 09:43:16 1999
+++ sys/i386/boot/cdboot/Makefile       Mon Dec  6 01:28:17 1999
@@ -10,7 +10,7 @@
 
 BINMODE=       444
 CFLAGS=                -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
-               -mno-486 \
+               -m386 \
                -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
 CFLAGS+=       -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
 CFLAGS+=       -I${.CURDIR}/../biosboot
--------  patch ends here --------

--
------------------------------------------------------------------------
Motoyuki Konno                  [EMAIL PROTECTED]   (Univ)
                                [EMAIL PROTECTED]         (Home)
                                [EMAIL PROTECTED]  (FreeBSD Project)
Yamanashi Medical University    http://www.freebsd.org/~motoyuki/ (WWW)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to