Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/usr.bin/ld Make it possible to compile a cross-linker by...



details:   https://anonhg.NetBSD.org/src/rev/ebf59b526777
branches:  trunk
changeset: 513157:ebf59b526777
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Wed Jul 25 11:58:04 2001 +0000

description:
Make it possible to compile a cross-linker by just defining TARGET_MACHINE_ARCH
to the desired architecture.

Note that this is for the old ld of the old toolchain.

diffstat:

 gnu/usr.bin/ld/Makefile.inc |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 83af6fd73c90 -r ebf59b526777 gnu/usr.bin/ld/Makefile.inc
--- a/gnu/usr.bin/ld/Makefile.inc       Wed Jul 25 09:57:31 2001 +0000
+++ b/gnu/usr.bin/ld/Makefile.inc       Wed Jul 25 11:58:04 2001 +0000
@@ -1,8 +1,14 @@
-#      $NetBSD: Makefile.inc,v 1.3 1998/12/17 15:17:27 pk Exp $
+#      $NetBSD: Makefile.inc,v 1.4 2001/07/25 11:58:04 aymeric Exp $
 
 SHLIBPATH = $(.CURDIR)/../../../../libexec/ld.aout_so
 
-CPPFLAGS += -I$(SHLIBPATH) -I$(SHLIBPATH)/arch/$(MACHINE_ARCH) -I$(.CURDIR)
-.PATH:       $(SHLIBPATH)   $(SHLIBPATH)/arch/$(MACHINE_ARCH)
+TARGET_MACHINE_ARCH ?= $(MACHINE_ARCH)
+
+.if $(TARGET_MACHINE_ARCH) != $(MACHINE_ARCH)
+CPPFLAGS += -DCROSS_LINKER -DXHOST="$(MACHINE_ARCH)"
+.endif
+
+CPPFLAGS += -I$(SHLIBPATH) -I$(SHLIBPATH)/arch/$(TARGET_MACHINE_ARCH) -I$(.CURDIR)
+.PATH:       $(SHLIBPATH)   $(SHLIBPATH)/arch/$(TARGET_MACHINE_ARCH)
 
 CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes



Home | Main Index | Thread Index | Old Index