delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/21/17:54:54

Date: Fri, 21 Feb 2003 22:57:01 +0000
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Subject: Build fixes for tests/cygnus, revision 2 [PATCH]
Message-Id: <E18mM44-00010k-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Below is a patch that fixes the build under tests/cygnus. The change
over the previous patch is that tests/cygnus/tgen now builds.
Previously there was a duplicate definition clash between libc
and libgcc for the symbol __register_frame_info. I looked at the output
of 'gpp -v' for the programs in tgen and it turns out they include
libgcc.a either side of libc in the link line.

OK to commit?

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	21 Feb 2003 22:50:49 -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	21 Feb 2003 22:50:49 -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) $(LIBGCCA) -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 -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019