Index: include/floatingpoint.h =================================================================== --- include/floatingpoint.h (revision 0) +++ include/floatingpoint.h (revision 0) @@ -0,0 +1 @@ +#include Property changes on: include/floatingpoint.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + FreeBSD=%H Added: svn:eol-style + native Index: include/Makefile =================================================================== --- include/Makefile (revision 182913) +++ include/Makefile (working copy) @@ -9,8 +9,9 @@ SUBDIR= arpa gssapi protocols rpcsvc rpc INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ - dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ - fts.h ftw.h getopt.h glob.h grp.h gssapi.h \ + dirent.h dlfcn.h elf.h elf-hints.h err.h float.h floatingpoint.h \ + fmtmsg.h fnmatch.h fstab.h fts.h ftw.h \ + getopt.h glob.h grp.h gssapi.h \ histedit.h ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ @@ -20,7 +21,7 @@ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ res_update.h resolv.h runetype.h search.h setjmp.h sgtty.h \ signal.h stab.h \ - stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ + stdarg.h stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ ulimit.h unistd.h utime.h utmp.h uuid.h varargs.h vis.h wchar.h \ @@ -111,9 +112,6 @@ .for i in ${LHDRS} INCSLINKS+= sys/$i ${INCLUDEDIR}/$i .endfor -.for i in ${MHDRS} -INCSLINKS+= machine/$i ${INCLUDEDIR}/$i -.endfor .for i in ${PHDRS} INCSLINKS+= sys/$i ${INCLUDEDIR}/$i .endfor @@ -142,6 +140,12 @@ -f ${.CURDIR}/../etc/mtree/BIND.include.dist \ -p ${DESTDIR}${INCLUDEDIR} .endif +.if ${MACHINE_ARCH} == "amd64" && ${MK_LIB32} != "no" + if [ -L ${DESTDIR}${INCLUDEDIR}32/machine ]; then \ + rm -f ${DESTDIR}${INCLUDEDIR}32/machine; \ + fi + mkdir -p ${DESTDIR}${INCLUDEDIR}32/machine +.endif copies: .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} altq crypto machine machine/pc \ @@ -153,6 +157,13 @@ done .endif .endfor +.if ${MACHINE_ARCH} == "amd64" && ${MK_LIB32} != "no" + mkdir -p ${DESTDIR}${INCLUDEDIR}32/machine + cd ${DESTDIR}${INCLUDEDIR}32/machine; \ + for h in *.h; do \ + if [ -L $$h ]; then rm -f $$h; fi; \ + done +.endif .for i in ${LDIRS} ${LSUBDIRS:Ndev/acpica:Ndev/bktr} ${LSUBSUBDIRS} cd ${.CURDIR}/../sys; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ @@ -216,6 +227,11 @@ cd ${.CURDIR}/../sys/rpc; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 types.h \ ${DESTDIR}${INCLUDEDIR}/rpc +.if ${MACHINE_ARCH} == "amd64" && ${MK_LIB32} != "no" + cd ${.CURDIR}/../sys/i386/include; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}32/machine +.endif symlinks: @${ECHO} "Setting up symlinks to kernel source tree..." @@ -319,3 +335,10 @@ ln -fs ../../../sys/rpc/$$h \ ${DESTDIR}${INCLUDEDIR}/rpc; \ done +.if ${MACHINE_ARCH} == "amd64" && ${MK_LIB32} != "no" + cd ${.CURDIR}/../sys/i386/include; \ + for h in *.h; do \ + ln -fs ../../../sys/i386/include/$$h \ + ${DESTDIR}${INCLUDEDIR}32/machine; \ + done +.endif Index: include/float.h =================================================================== --- include/float.h (revision 0) +++ include/float.h (revision 0) @@ -0,0 +1 @@ +#include Property changes on: include/float.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + FreeBSD=%H Added: svn:eol-style + native Index: include/stdarg.h =================================================================== --- include/stdarg.h (revision 0) +++ include/stdarg.h (revision 0) @@ -0,0 +1 @@ +#include Property changes on: include/stdarg.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + FreeBSD=%H Added: svn:eol-style + native Index: gnu/usr.bin/cc/cc_tools/freebsd-native.h =================================================================== --- gnu/usr.bin/cc/cc_tools/freebsd-native.h (revision 182913) +++ gnu/usr.bin/cc/cc_tools/freebsd-native.h (working copy) @@ -23,6 +23,9 @@ #else #define STANDARD_INCLUDE_DIR PREFIX"/include" #endif +#ifdef __amd64__ +#define INCLUDE32 " %{m32:-I"PREFIX"/include32} " +#endif /* Under FreeBSD, the normal location of the compiler back ends is the /usr/libexec directory. @@ -44,7 +47,11 @@ #undef MD_STARTFILE_PREFIX /* We don't need one for now. */ #define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" +#ifdef __amd64__ +#define STARTFILE_PREFIX_SPEC "%{m32:"PREFIX"/lib32/} %{!m32:"PREFIX"/lib/}" +#else #define STARTFILE_PREFIX_SPEC PREFIX"/lib/" +#endif #if 0 #define LIBGCC_SPEC "%{shared: -lgcc_pic} \ Index: gnu/usr.bin/binutils/ld/Makefile.amd64 =================================================================== --- gnu/usr.bin/binutils/ld/Makefile.amd64 (revision 182913) +++ gnu/usr.bin/binutils/ld/Makefile.amd64 (working copy) @@ -12,7 +12,7 @@ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} Index: contrib/gcc/gcc.c =================================================================== --- contrib/gcc/gcc.c (revision 182913) +++ contrib/gcc/gcc.c (working copy) @@ -780,12 +780,16 @@ static const char *trad_capable_cpp = "cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}"; +#ifndef INCLUDE32 +#define INCLUDE32 " " +#endif + /* We don't wrap .d files in %W{} since a missing .d file, and therefore no dependency entry, confuses make into thinking a .o file that happens to exist is up-to-date. */ static const char *cpp_unique_options = "%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}}\ - %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I\ + %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v}"INCLUDE32"%{I*&F*} %{P} %I\ %{MD:-MD %{!o:%b.d}%{o*:%.d%*}}\ %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\ %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\ Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 182913) +++ Makefile.inc1 (working copy) @@ -456,6 +456,8 @@ .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t} .endif + cd ${.CURDIR}/gnu/usr.bin/cc/include; \ + ${LIB32WMAKE} DESTDIR=${LIB32TMP} ${_t} .endfor .for _dir in usr.bin/lex/lib cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj Index: sys/boot/i386/Makefile.inc =================================================================== --- sys/boot/i386/Makefile.inc (revision 182913) +++ sys/boot/i386/Makefile.inc (working copy) @@ -11,7 +11,7 @@ .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -m32 -march=i386 -LDFLAGS+= -m elf_i386_fbsd +LDFLAGS+= -m elf_i386_fbsd -L${LIBDIR} AFLAGS+= --32 .endif