Source-Changes-HG archive

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

[src/sommerfeld_i386mp_1]: src/sys/arch/i386/stand Assign COPTS instead of ad...



details:   https://anonhg.NetBSD.org/src/rev/f218159cb910
branches:  sommerfeld_i386mp_1
changeset: 482560:f218159cb910
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Jun 27 20:44:09 2002 +0000

description:
Assign COPTS instead of adding to it, avoids situation where -mi386
is mixed with -march=something_incompatible

suggested by thorpej

diffstat:

 sys/arch/i386/stand/Makefile.booters |  115 +++++++++++++++++++++++++++++++++++
 1 files changed, 115 insertions(+), 0 deletions(-)

diffs (119 lines):

diff -r 2e8c8b5cb0fc -r f218159cb910 sys/arch/i386/stand/Makefile.booters
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/stand/Makefile.booters      Thu Jun 27 20:44:09 2002 +0000
@@ -0,0 +1,115 @@
+#      $NetBSD: Makefile.booters,v 1.35.2.2 2002/06/27 20:44:09 pooka Exp $
+
+.include <bsd.own.mk>
+
+STRIPFLAG=
+BINMODE=444
+
+# Make sure we override any optimization options specified by the
+# user.
+COPTS= -Os -mcpu=i386
+COPTS+= -ffreestanding
+
+I386_STAND_DIR?= $S/arch/i386/stand
+
+.PATH: ${I386_STAND_DIR}/lib/crt/bootsect ${I386_STAND_DIR}/lib
+BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o \
+       bios_disk.o diskbuf.o
+
+.PATH: ${I386_STAND_DIR}/lib/crt/rom
+ROMSTART= start_rom.o
+GENPROMDIR= ${I386_STAND_DIR}/genprom
+GENPROMOBJDIR!= cd ${GENPROMDIR} && ${PRINTOBJDIR}
+GENPROM= ${GENPROMOBJDIR}/genprom
+
+.PATH: ${I386_STAND_DIR}/lib/crt/dos
+DOSSTART= start_dos.o doscommain.o
+
+.PATH: ${I386_STAND_DIR}/lib/crt/pxe
+PXESTART= start_pxe.o
+
+CPPFLAGS += -nostdinc -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa
+CPPFLAGS+= -D_STANDALONE
+
+CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list
+SRCS+= vers.c
+
+.if !make(obj) && !make(clean) && !make(cleandir)
+.BEGIN: machine
+.NOPATH: machine
+.endif
+
+realdepend realall: machine
+CLEANFILES+= machine
+
+machine::
+       -rm -f $@
+       ln -s $S/arch/i386/include $@
+
+${OBJS} ${BSSTART} ${ROMSTART} ${DOSSTART} ${PXESTART}: machine
+
+### find out what to use for libkern
+KERN_AS=       library
+.include "${S}/lib/libkern/Makefile.inc"
+LIBKERN=       ${KERNLIB}
+
+### find out what to use for libz
+Z_AS=          library
+.include "${S}/lib/libz/Makefile.inc"
+LIBZ=          ${ZLIB}
+
+### find out what to use for libsa
+SA_AS=         library
+SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
+.include "${S}/lib/libsa/Makefile.inc"
+LIBSA=         ${SALIB}
+
+### find out what to use for libi386
+I386DIR= ${I386_STAND_DIR}/lib
+.include "${I386DIR}/Makefile.inc"
+LIBI386=               ${I386LIB}
+
+cleandir distclean: cleanlibdir
+
+cleanlibdir:
+       rm -rf lib
+
+.if ${OBJECT_FMT} == "ELF"
+LDFLAGS=-M -e start    # -N does not work properly.
+.else
+LDFLAGS=-N -M -e _start 
+.endif
+
+LIBLIST=${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBI386} ${LIBSA}
+
+.PHONY: vers.c
+vers.c: ${VERSIONFILE}
+       sh ${S}conf/newvers_stand.sh ${.ALLSRC} 'i386' ${NEWVERSWHAT}
+
+CLEANFILES+= ${BASE}.sym
+${BASE}.sym: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
+       ${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
+           ${LIBLIST} >${BASE}.list
+
+CLEANFILES+= ${BASE}.rom
+${BASE}.rom: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
+       ${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
+           ${LIBLIST} >${BASE}.list
+       ${OBJCOPY} -O binary ${BASE}.sym ${BASE}.bin
+       ${GENPROM} ${ROM_SIZE} < ${BASE}.bin > ${BASE}.rom || \
+           rm -f ${BASE}.rom
+       rm -f ${BASE}.bin
+
+CLEANFILES+= ${BASE}.com
+${BASE}.com: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
+       ${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
+           ${LIBLIST} >${BASE}.list
+       ${OBJCOPY} -O binary ${BASE}.sym ${BASE}.com
+
+CLEANFILES+= ${BASE}.bin
+${BASE}.bin: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
+       ${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
+           ${LIBLIST} > ${BASE}.list
+       ${OBJCOPY} -O binary ${BASE}.sym ${BASE}.bin
+
+.include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index