Mail Archives: djgpp-workers/2003/01/26/07:45:09
Hello.
I discovered that tests/cygnus/tgen doesn't build either.
So I tried to fix that up. I already had a fix in there for the C++-ness
of some of the programs. But the recent crt0 changes seem to have broken
that too. I get the following build error:
gpp -nostdlib -L../../../lib -o gacosvec.exe gacosvec.o ./qfloat/qfloatx.a ../../../lib/crt0.o ../../../lib/libm.a c:/djgpp/lib/gcc-lib/djgpp/3.21/libstdcxx.a -lc c:/djgpp/lib/gcc-lib/djgpp/3.21/libgcc.a
c:/djgpp/lib/gcc-lib/djgpp/3.21/libgcc.a(unwind-dw2-fde.o)(.text+0x230): multiple definition of `___register_frame_info'
../../../lib/libc.a(rfinfo.o)(.text+0x0):rfinfo.c: first defined here
collect2: ld returned 1 exit status
make.exe: *** [gacosvec.exe] Error 1
Any ideas?
This seems weird, because I don't think the recent crt0 changes
have done anything that would change __register_frame_info's usage
by crt0. A quick nm and grep shows that it is used by 2.03 & CVS's crt0
and is present in 2.03 & CVS's libc. Bizarre.
Anyway, below is my current patch for makefiles under tests/cygnus.
Thanks, bye, Rich =]
Index: tests/cygnus/makefile
===================================================================
RCS file: /cvs/djgpp/djgpp/tests/cygnus/makefile,v
retrieving revision 1.4
diff -p -c -3 -r1.4 makefile
*** tests/cygnus/makefile 29 Jul 1999 10:20:08 -0000 1.4
--- tests/cygnus/makefile 26 Jan 2003 12:40:08 -0000
*************** HERE := $(shell pwd)
*** 25,37 ****
TOP = $(HERE)/..
CC = gcc
# FIXME: this should probably use misc.exe
RM = rm -f
DEFS = -D_USE_LIBM_MATH_H -D_HAVE_STDC
CPPFLAGS = -nostdinc -I$(HERE) -I$(TOP)/../include
CFLAGS = $(DEFS) -O2 -g
! LIBS = -lm
OFILES = test.o string.o convert.o conv_vec.o iconv_vec.o test_is.o \
dvec.o sprint_vec.o sprint_ivec.o math.o math2.o test_ieee.o
--- 25,41 ----
TOP = $(HERE)/..
CC = gcc
+ CRT0 = $(TOP)/../lib/crt0.o
+ LIBGCCA := $(shell $(CC) -print-file-name=libgcc.a)
+
# FIXME: this should probably use misc.exe
RM = rm -f
DEFS = -D_USE_LIBM_MATH_H -D_HAVE_STDC
CPPFLAGS = -nostdinc -I$(HERE) -I$(TOP)/../include
CFLAGS = $(DEFS) -O2 -g
! LIBS = $(CRT0) -lm -lc $(LIBGCCA)
! LDFLAGS = -nostdlib -L$(TOP)/../lib
OFILES = test.o string.o convert.o conv_vec.o iconv_vec.o test_is.o \
dvec.o sprint_vec.o sprint_ivec.o math.o math2.o test_ieee.o
*************** tgen/g%vec.exe: tgen/g%vec.cpp tgen/genm
*** 119,125 ****
QFLOAT=$(HERE)/tgen/qfloat TEST=$(HERE) MATH=$(TOP)/../lib
mtest.exe: $(OFILES) $(VEC_OFILES)
! $(CC) -o $@ $(LDFLAGS) -L$(TOP)/../lib $(OFILES) $(VEC_OFILES) $(LIBS)
$(OFILES) $(VEC_OFILES) : test.h
--- 123,129 ----
QFLOAT=$(HERE)/tgen/qfloat TEST=$(HERE) MATH=$(TOP)/../lib
mtest.exe: $(OFILES) $(VEC_OFILES)
! $(CC) -o $@ $(LDFLAGS) $(OFILES) $(VEC_OFILES) $(LIBS)
$(OFILES) $(VEC_OFILES) : test.h
Index: tests/cygnus/tgen/makefile
===================================================================
RCS file: /cvs/djgpp/djgpp/tests/cygnus/tgen/makefile,v
retrieving revision 1.1
diff -p -c -3 -r1.1 makefile
*** tests/cygnus/tgen/makefile 4 Apr 1999 08:13:41 -0000 1.1
--- tests/cygnus/tgen/makefile 26 Jan 2003 12:40:08 -0000
***************
*** 3,21 ****
TOP = ../..
CC = gcc
! LDFLAGS = $(NEWLIBM)
.SUFFIXES:
.SUFFIXES: .exe .o .c .cpp
.c.exe:
! $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS)
.o.exe:
! $(CC) -L$(TOP)/../lib -o $@ $< $(QFLTLIB) $(LDFLAGS)
.cpp.o:
! $(CC) -c $< $(CFLAGS) $(CPPFLAGS)
QFLOAT = ./qfloat
TEST = ..
--- 3,27 ----
TOP = ../..
CC = gcc
!
! CRT0 = $(TOP)/../lib/crt0.o
! LIBGCCA := $(shell $(CC) -print-file-name=libgcc.a)
! LIBSTDCXX := $(shell $(CC) -print-file-name=libstdcxx.a)
!
! LDFLAGS = -nostdlib -L$(TOP)/../lib
! LIBS = $(CRT0) $(NEWLIBM) $(LIBSTDCXX) -lc $(LIBGCCA)
.SUFFIXES:
.SUFFIXES: .exe .o .c .cpp
.c.exe:
! $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
.o.exe:
! $(CXX) $(LDFLAGS) -o $@ $< $(QFLTLIB) $(LIBS)
.cpp.o:
! $(CXX) -c $< $(CFLAGS) $(CPPFLAGS)
QFLOAT = ./qfloat
TEST = ..
*************** HEADERS = $(QFLOAT)/qfloat.h\
*** 24,38 ****
$(TEST)/test.h\
genmathv.h
! INCDIRS = -I. -I$(QFLOAT) -I$(MATH) -I$(TEST) -I$(DJDIR)/include
QFLTLIB = $(QFLOAT)/qfloatx.a
! NEWLIBM = $(MATH)/libm.a
# -Ic:/testmath/extended# -Ic:/cephes.src/qfloat
! CFLAGS = -O2 $(INCDIRS) -D_USE_LIBM_MATH_H -D_HAVE_STDC \
-march=pentium -Wall
ALL = gacosvec.exe\
--- 30,44 ----
$(TEST)/test.h\
genmathv.h
! INCDIRS = -I. -I$(QFLOAT) -I$(MATH) -I$(TEST) -I$(TOP)/../include
QFLTLIB = $(QFLOAT)/qfloatx.a
! NEWLIBM = $(TOP)/../lib/libm.a
# -Ic:/testmath/extended# -Ic:/cephes.src/qfloat
! CFLAGS = -nostdinc -O2 $(INCDIRS) -D_USE_LIBM_MATH_H -D_HAVE_STDC \
-march=pentium -Wall
ALL = gacosvec.exe\
- Raw text -