|
From: Peter K. <pk...@us...> - 2001-08-16 13:12:47
|
The following file was modified in apps: Name Old version New version Comment ---- ----------- ----------- ------- Rules.elinux 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Synchronised with our latest version of this file. The diff of the modified file(s): --- Rules.elinux 2001/05/07 11:23:57 1.3 +++ Rules.elinux 2001/08/16 13:12:46 1.4 @@ -79,6 +79,14 @@ TARGET_TYPE =3D elinux CRIS =3D 1 =20 +# This is for compatibility with cris-dist-1.7, where a.out was the +# default, but which does not understand -mcrisaout. We'll only do the +# costly assignment if we don't inherit the value, which is a " " or +# -mcrisaout. +ifndef AXIS_LD_OUTPUT_FORMAT_OPTION +AXIS_LD_OUTPUT_FORMAT_OPTION :=3D $(shell `gcc-cris -print-prog-name=3Dld`= -V | sed -n -e 's/.* crisaout/-mcrisaout/p') # +endif + # ELINUX always uses uclibc. Though a check that the app can use uclibc # is in order. ifndef USE_UCLIBC @@ -148,7 +156,11 @@ CPP =3D gcc_cris -mlinux -DCRISMMU -E CXX =3D gcc_cris -mlinux -DCRISMMU -xc++ =20 -LDFLAGS =3D -s -static +LDFLAGS =3D -static +ifneq ($(AXIS_DEBUG),debug) +# Add -s flag for stripping if not building for debug. +LDFLAGS +=3D -s +endif # AXIS_DEBUG !=3D debug endif # AXIS_WILL_USE_LIB =3D UCLIBC =20 ifeq ($(AXIS_WILL_USE_LIB),GLIBC) @@ -156,17 +168,27 @@ =20 # We prefer getting <asm/...> and <linux/...> from the kernel we compile, # rather than what was installed with the compiler, so put it first in the -# system include path. +# system include path. Though we have to go through a separate directory +# with just the linux and asm dirs, rather than use $(ELINUXDIR)/include, +# lest we also drag in the other subdirs, which collide with the normal +# gcc-cris -mlinux system-includes, for example <net/...>. =20 -CC =3D gcc-cris -mlinux -isystem $(ELINUXDIR)/include -CPP =3D gcc-cris -mlinux -E -isystem $(ELINUXDIR)/include -CXX =3D g++-cris -mlinux -xc++ -isystem $(ELINUXDIR)/include -LDFLAGS =3D -s -L$(prefix)/lib +CC =3D gcc-cris -mlinux -isystem $(prefix)/include +CPP =3D gcc-cris -mlinux -E -isystem $(prefix)/include +CXX =3D g++-cris -mlinux -xc++ -isystem $(prefix)/include + +LDFLAGS =3D -L$(prefix)/lib +ifneq ($(AXIS_DEBUG),debug) +# Add -s flag for stripping if not building for debug. +LDFLAGS +=3D -s +endif # AXIS_DEBUG !=3D debug endif # AXIS_WILL_USE_LIB !=3D GLIBC =20 TARGET_TYPE =3D clinux CRIS =3D 1 =20 +AXIS_LD_OUTPUT_FORMAT_OPTION =3D -mcrislinux + endif # CLINUX =20 ifdef CRIS @@ -174,7 +196,7 @@ # This is for building for the CRIS architecture. =20 OBJCOPY =3D objcopy-cris -LD =3D ld-cris +LD =3D ld-cris $(AXIS_LD_OUTPUT_FORMAT_OPTION) AR =3D ar-cris RANLIB =3D ranlib-cris =20 @@ -212,6 +234,12 @@ =20 ifdef CRIS CFLAGS +=3D -O2 + +ifeq ($(AXIS_DEBUG),debug) +# Add suitable compiler flags for debugging. +CFLAGS +=3D -g -fno-omit-frame-pointer +endif +=20 ifdef ELINUX CFLAGS +=3D -DELINUX endif @@ -283,8 +311,22 @@ endif endif # !ROOT_MAKEFRAG =20 +nodebug: + grep -v AXIS_DEBUG $(makefrag_name) > $(makefrag_name).tmp + mv -f $(makefrag_name).tmp $(makefrag_name) + -$(MAKE) clean + +debug: + grep -v AXIS_DEBUG $(makefrag_name) >$(makefrag_name).tmp + echo AXIS_DEBUG=3Ddebug >>$(makefrag_name).tmp + mv -f $(makefrag_name).tmp $(makefrag_name) + -$(MAKE) clean + cris-axis-linux-gnu elinux clinux host: echo AXIS_BUILDTYPE=3D$@ > .tmp$(makefrag_name) + ifeq ($(AXIS_DEBUG),debug) + echo AXIS_DEBUG=3D$(AXIS_DEBUG) >> .tmp$(makefrag_name) + endif -$(MAKE) configsubs AXIS_BUILDTYPE=3D$@ ROOT_MAKEFRAG=3D$(shell echo `pwd= `/.tmp$(makefrag_name)) @rm -f .tmp$(makefrag_name) =20 |