Source-Changes-HG archive

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

[src/trunk]: src/gnu/usr.bin/binutils Add new toolchain binutils build struct...



details:   https://anonhg.NetBSD.org/src/rev/250678bc510f
branches:  trunk
changeset: 513651:250678bc510f
user:      tv <tv%NetBSD.org@localhost>
date:      Mon Aug 06 19:11:59 2001 +0000

description:
Add new toolchain binutils build structure.

diffstat:

 gnu/usr.bin/binutils/Makefile                   |   20 +-
 gnu/usr.bin/binutils/Makefile.inc               |   20 +-
 gnu/usr.bin/binutils/addr2line/Makefile         |    8 +-
 gnu/usr.bin/binutils/ar/Makefile                |    8 +-
 gnu/usr.bin/binutils/c++filt/Makefile           |   15 +-
 gnu/usr.bin/binutils/common/Makefile            |   25 ++-
 gnu/usr.bin/binutils/common/Makefile.prog       |   41 +++
 gnu/usr.bin/binutils/common/arch/i386/config.h  |  193 ++++++++++++++++
 gnu/usr.bin/binutils/common/arch/i386/defs.mk   |   30 ++
 gnu/usr.bin/binutils/gas/Makefile               |   31 ++
 gnu/usr.bin/binutils/gas/arch/i386/config.h     |  277 ++++++++++++++++++++++++
 gnu/usr.bin/binutils/gas/arch/i386/defs.mk      |    6 +
 gnu/usr.bin/binutils/gas/arch/i386/itbl-cpu.h   |    4 +
 gnu/usr.bin/binutils/gas/arch/i386/obj-format.h |    4 +
 gnu/usr.bin/binutils/gas/arch/i386/targ-cpu.h   |    4 +
 gnu/usr.bin/binutils/gas/arch/i386/targ-env.h   |    4 +
 gnu/usr.bin/binutils/gas/asconfig.texi          |    2 +
 gnu/usr.bin/binutils/ld/Makefile                |   60 +++++
 gnu/usr.bin/binutils/ld/arch/i386/config.h      |  178 +++++++++++++++
 gnu/usr.bin/binutils/ld/arch/i386/defs.mk       |   10 +
 gnu/usr.bin/binutils/ld/arch/i386/ldemul-list.h |   11 +
 gnu/usr.bin/binutils/nm/Makefile                |    8 +-
 gnu/usr.bin/binutils/objcopy/Makefile           |    8 +-
 gnu/usr.bin/binutils/objdump/Makefile           |    8 +-
 gnu/usr.bin/binutils/ranlib/Makefile            |    8 +-
 gnu/usr.bin/binutils/readelf/Makefile           |    5 +
 gnu/usr.bin/binutils/size/Makefile              |    8 +-
 gnu/usr.bin/binutils/strings/Makefile           |    8 +-
 gnu/usr.bin/binutils/strip/Makefile             |    8 +-
 29 files changed, 995 insertions(+), 17 deletions(-)

diffs (truncated from 1227 to 300 lines):

diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/Makefile
--- a/gnu/usr.bin/binutils/Makefile     Mon Aug 06 18:28:19 2001 +0000
+++ b/gnu/usr.bin/binutils/Makefile     Mon Aug 06 19:11:59 2001 +0000
@@ -1,5 +1,18 @@
-#      $NetBSD: Makefile,v 1.12 2001/01/09 03:13:40 lukem Exp $
+#      $NetBSD: Makefile,v 1.13 2001/08/06 19:11:59 tv Exp $
+
+.include <bsd.own.mk>
+
+.if defined(USE_NEW_TOOLCHAIN)
+
+.include "${.CURDIR}/common/arch/${MACHINE_ARCH}/defs.mk"
 
+SUBDIR=                common gas ld ${G_PROGRAMS:C/-new$//:cxxfilt=c++filt}
+SUBDIR:=       ${SUBDIR:O} # alphabetize
+
+.else
+#
+# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
+#
 .if (${MACHINE_ARCH} != sparc64)
 SUBDIR=                common .WAIT addr2line ar c++filt nm objcopy objdump ranlib \
                size strings strip
@@ -11,4 +24,9 @@
 .PATH: ${.CURDIR}/../../dist/binutils
 
 .include <bsd.info.mk>
+#
+# XXX - END - Old toolchain build goop - delete when everything migrated - XXX
+#
+.endif
+
 .include <bsd.subdir.mk>
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/Makefile.inc
--- a/gnu/usr.bin/binutils/Makefile.inc Mon Aug 06 18:28:19 2001 +0000
+++ b/gnu/usr.bin/binutils/Makefile.inc Mon Aug 06 19:11:59 2001 +0000
@@ -1,10 +1,24 @@
-#      $NetBSD: Makefile.inc,v 1.8 2001/01/09 08:52:58 enami Exp $
+#      $NetBSD: Makefile.inc,v 1.9 2001/08/06 19:11:59 tv Exp $
 
 .if !defined(__MAKEFILE_INC_INCLUDED__)
 __MAKEFILE_INC_INCLUDED__=1
 
 .include <bsd.own.mk>
 
+.if defined(USE_NEW_TOOLCHAIN)
+
+# Make sure we use the pre-generated C files
+.l.c .y.c:
+
+GCPPFLAGS=     ${G_DEFS} ${G_INCLUDES}
+CPPFLAGS+=     ${GCPPFLAGS:M-D*:N-DLOCALEDIR*} ${GCPPFLAGS:M-I*:N-I.*} \
+               -I${TOP}/lib/libbfd/arch/${MACHINE_ARCH} \
+               -DLOCALEDIR=\"${LOCALEDIR}\"
+
+.else
+#
+# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
+#
 CPPFLAGS+=     -I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../common \
                -I${BFDOBJ} -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include \
                -DHAVE_CONFIG_H
@@ -16,6 +30,10 @@
 LIBCOMMONDIR!= cd ${.CURDIR}/../common && ${PRINTOBJDIR}
 
 .PATH: ${DIST}/binutils
+#
+# XXX - END - Old toolchain build goop - delete when everything migrated - XXX
+#
+.endif
 
 .if exists(${.CURDIR}/../../Makefile.inc)
 .include "${.CURDIR}/../../Makefile.inc"
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/addr2line/Makefile
--- a/gnu/usr.bin/binutils/addr2line/Makefile   Mon Aug 06 18:28:19 2001 +0000
+++ b/gnu/usr.bin/binutils/addr2line/Makefile   Mon Aug 06 19:11:59 2001 +0000
@@ -1,7 +1,13 @@
-#      $NetBSD: Makefile,v 1.4 1999/02/09 19:21:54 tv Exp $
+#      $NetBSD: Makefile,v 1.5 2001/08/06 19:12:00 tv Exp $
 
 PROG=          addr2line
+
+.include <bsd.own.mk>
+.if defined(USE_NEW_TOOLCHAIN)
+.include "${.CURDIR}/../common/Makefile.prog"
+.else
 SRCS=          addr2line.c
 MAN=           addr2line.1
 
 .include <bsd.prog.mk>
+.endif
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/ar/Makefile
--- a/gnu/usr.bin/binutils/ar/Makefile  Mon Aug 06 18:28:19 2001 +0000
+++ b/gnu/usr.bin/binutils/ar/Makefile  Mon Aug 06 19:11:59 2001 +0000
@@ -1,7 +1,13 @@
-#      $NetBSD: Makefile,v 1.4 1999/02/09 19:21:54 tv Exp $
+#      $NetBSD: Makefile,v 1.5 2001/08/06 19:12:00 tv Exp $
 
 PROG=          ar
+
+.include <bsd.own.mk>
+.if defined(USE_NEW_TOOLCHAIN)
+.include "${.CURDIR}/../common/Makefile.prog"
+.else
 SRCS=          ar.c not-ranlib.c
 MAN=           ar.1
 
 .include <bsd.prog.mk>
+.endif
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/c++filt/Makefile
--- a/gnu/usr.bin/binutils/c++filt/Makefile     Mon Aug 06 18:28:19 2001 +0000
+++ b/gnu/usr.bin/binutils/c++filt/Makefile     Mon Aug 06 19:11:59 2001 +0000
@@ -1,14 +1,19 @@
-#      $NetBSD: Makefile,v 1.9 1999/02/09 19:21:54 tv Exp $
+#      $NetBSD: Makefile,v 1.10 2001/08/06 19:12:00 tv Exp $
 
 PROG=          c++filt
+CPPFLAGS+=     -DMAIN
+CLEANFILES+=   c++filt.1
+
+.include <bsd.own.mk>
+.if defined(USE_NEW_TOOLCHAIN)
+.include "${.CURDIR}/../common/Makefile.prog"
+.else
 SRCS=          cplus-dem.c underscore.c
-MAN=           c++filt.1
-CPPFLAGS+=     -DMAIN
-CLEANFILES+=   ${MAN}
 
 .include <bsd.prog.mk>
+.endif
 
 .PATH: ${DIST}/libiberty
 
-${MAN}: ${DIST}/binutils/cxxfilt.man
+c++filt.1: ${DIST}/binutils/cxxfilt.man
        sed -e "s/@PROGRAM@/${PROG}/" < $> > $@
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/common/Makefile
--- a/gnu/usr.bin/binutils/common/Makefile      Mon Aug 06 18:28:19 2001 +0000
+++ b/gnu/usr.bin/binutils/common/Makefile      Mon Aug 06 19:11:59 2001 +0000
@@ -1,5 +1,24 @@
-#      $NetBSD: Makefile,v 1.8 1999/10/10 13:02:32 pk Exp $
+#      $NetBSD: Makefile,v 1.9 2001/08/06 19:12:01 tv Exp $
+.include <bsd.own.mk>
+
+.if defined(USE_NEW_TOOLCHAIN)
+
+.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
+
+TOP=           ${.CURDIR}/../../..
+DIST=          ${TOP}/dist/toolchain
 
+TEXINFO=       ${G_TEXINFOS}
+INFOFLAGS=     -I${DIST}/binutils
+
+.PATH: ${DIST}/binutils
+
+.include <bsd.info.mk>
+
+.else
+#
+# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
+#
 LIB=           common
 
 SRCS=          arparse.y arlex.l arsup.c bucomm.c version.c filemode.c \
@@ -18,3 +37,7 @@
 arlex.c: arparse.h
 
 .include <bsd.lib.mk>
+#
+# XXX - END - Old toolchain build goop - delete when everything migrated - XXX
+#
+.endif
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/common/Makefile.prog
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/usr.bin/binutils/common/Makefile.prog Mon Aug 06 19:11:59 2001 +0000
@@ -0,0 +1,41 @@
+#      $NetBSD: Makefile.prog,v 1.1 2001/08/06 19:12:01 tv Exp $
+#
+# Common Makefile fragment for a binutils program.
+#
+
+.include <bsd.own.mk>
+TOP=           ${.CURDIR}/../../..
+DIST=          ${TOP}/dist/toolchain
+
+.include "${.CURDIR}/../common/arch/${MACHINE_ARCH}/defs.mk"
+
+# Might end in "-new" in GNU makefile
+XPROG=         ${PROG:c++filt=cxxfilt}
+BUPROG=                ${G_PROGRAMS:M${XPROG}*:S/-/_/}
+
+SRCS=          ${G_${BUPROG}_OBJECTS:.o=.c} \
+               ${G_${BUPROG}_DEPENDENCIES:M*.o:.o=.c}
+MAN=           ${G_man_MANS:M${PROG}.1}
+
+CPPFLAGS+=     -I${.CURDIR}/../common/arch/${MACHINE_ARCH}
+
+LDADD=         -lintl
+DPADD=         ${LIBINTL}
+
+.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
+BFDOBJ!=       cd ${TOP}/lib/libbfd && ${PRINTOBJDIR}
+LDADD+=                -L${BFDOBJ} -lbfd
+DPADD+=                ${BFDOBJ}/libbfd_pic.a
+.endif
+
+.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
+IBERTYOBJ!=    cd ${TOP}/lib/libiberty && ${PRINTOBJDIR}
+LDADD+=                -L${IBERTYOBJ} -liberty
+DPADD+=                ${IBERTYOBJ}/libiberty.a
+.endif
+
+.y.c .l.c:
+
+.PATH: ${DIST}/binutils
+
+.include <bsd.prog.mk>
diff -r ed8e770e7b72 -r 250678bc510f gnu/usr.bin/binutils/common/arch/i386/config.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/usr.bin/binutils/common/arch/i386/config.h    Mon Aug 06 19:11:59 2001 +0000
@@ -0,0 +1,193 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from:     NetBSD: toolchain2netbsd,v 1.4 2001/08/06 15:31:23 tv Exp  */
+
+/* config.h.  Generated automatically by configure.  */
+/* config.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if using alloca.c.  */
+/* #undef C_ALLOCA */
+
+/* Define to empty if the keyword does not work.  */
+/* #undef const */
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+   This function is required for alloca.c support on those systems.  */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define if you have alloca, as a function or macro.  */
+#define HAVE_ALLOCA 1
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define if you have a working `mmap' system call.  */
+#define HAVE_MMAP 1
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define as __inline if that's what the C compiler calls it.  */
+/* #undef inline */
+
+/* Define to `long' if <sys/types.h> doesn't define.  */
+/* #undef off_t */
+
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+/* #undef size_t */
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+/* #undef STACK_DIRECTION */
+
+/* Define if you have the ANSI C header files.  */
+#define STDC_HEADERS 1
+
+/* Define if lex declares yytext as a char * by default, not a char[].  */
+#define YYTEXT_POINTER 1
+
+/* Define if you have the __argz_count function.  */
+/* #undef HAVE___ARGZ_COUNT */
+
+/* Define if you have the __argz_next function.  */
+/* #undef HAVE___ARGZ_NEXT */
+
+/* Define if you have the __argz_stringify function.  */
+/* #undef HAVE___ARGZ_STRINGIFY */
+
+/* Define if you have the dcgettext function.  */
+#define HAVE_DCGETTEXT 1
+
+/* Define if you have the getcwd function.  */
+#define HAVE_GETCWD 1
+
+/* Define if you have the getpagesize function.  */
+#define HAVE_GETPAGESIZE 1
+
+/* Define if you have the munmap function.  */
+#define HAVE_MUNMAP 1
+
+/* Define if you have the putenv function.  */
+#define HAVE_PUTENV 1
+
+/* Define if you have the sbrk function.  */



Home | Main Index | Thread Index | Old Index