summaryrefslogtreecommitdiffstats
path: root/sys/boot/arc/loader
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-12-16 17:25:01 +0000
committermarcel <marcel@FreeBSD.org>1999-12-16 17:25:01 +0000
commit6db98885a563ab8ab2853b6991b22cdb71acb7e3 (patch)
treed25a3b7316b07f5e4413b452f755fcc68357489a /sys/boot/arc/loader
parentdb701263c188f477549acf3d2ea91304faa1e0cc (diff)
downloadFreeBSD-src-6db98885a563ab8ab2853b6991b22cdb71acb7e3.zip
FreeBSD-src-6db98885a563ab8ab2853b6991b22cdb71acb7e3.tar.gz
Don't build gensetdefs when we can use /usr/bin/gensetdefs. The latter
also creates setdef{0|1}.c so there's no need to have those in the repository. Using /usr/bin/gensetdefs has no consequences for the output.
Diffstat (limited to 'sys/boot/arc/loader')
-rw-r--r--sys/boot/arc/loader/Makefile29
-rw-r--r--sys/boot/arc/loader/setdef0.c48
-rw-r--r--sys/boot/arc/loader/setdef1.c41
3 files changed, 9 insertions, 109 deletions
diff --git a/sys/boot/arc/loader/Makefile b/sys/boot/arc/loader/Makefile
index acbb066..a12c182 100644
--- a/sys/boot/arc/loader/Makefile
+++ b/sys/boot/arc/loader/Makefile
@@ -19,9 +19,10 @@ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/../../.. -I.
CFLAGS+= -DLOADER
-CLEANFILES+= vers.c vers.o gensetdefs.o gensetdefs setdef0.o setdef1.o \
- setdefs.h start.o
-CLEANFILES+= ${BASE} ${BASE}.sym ${BASE}.list
+CLEANFILES+= setdef0.c setdef0.o setdef1.c setdef1.o setdefs.h start.o \
+ vers.c vers.o ${BASE} ${BASE}.exe ${BASE}.sym ${BASE}.list
+CLEANFILES+= loader.help
+CLEANFILES+= machine
CFLAGS+= -Wall
@@ -41,15 +42,10 @@ vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
${BASE}.exe: ${BASE} ${BASE}.help
elf2exe ${BASE}.sym ${BASE}.exe
-#${BASE}: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o setdef0.o setdef1.o
-# ${LD} -o ${BASE}.sym -M -e __start -N -Ttext ${LOAD_ADDRESS} \
-# ${CRT} setdef0.o ${OBJS} setdef1.o \
-# vers.o ${LIBSTAND} ${LIBARC} ${LIBSTAND} >${.OBJDIR}/${BASE}.list
-
${BASE}: ${OBJS} ${LIBSTAND} ${LIBARC} ${CRT} vers.o setdef0.o setdef1.o
${LD} -o ${BASE}.sym -M -N -Ttext ${LOAD_ADDRESS} \
- ${CRT} setdef0.o ${OBJS} setdef1.o \
- vers.o ${LIBSTAND} ${LIBARC} ${LIBSTAND} >${.OBJDIR}/${BASE}.list
+ ${CRT} setdef0.o ${OBJS} setdef1.o vers.o -L${DESTDIR}${LIBDIR} \
+ ${LIBSTAND} ${LIBARC} ${LIBSTAND} >${.OBJDIR}/${BASE}.list
${BASE}.help: help.common help.alpha
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
@@ -74,18 +70,11 @@ setdef1.o: setdefs.h
machine:
ln -sf ${.CURDIR}/../../../alpha/include machine
-CLEANFILES+= machine setdefs.h gensetdefs ${BASE} ${BASE}.exe loader.help
-
.include <bsd.prog.mk>
-setdefs.h: gensetdefs ${OBJS}
+.ORDER: setdefs.h setdef0.c setdef1.c
+setdefs.h setdef0.c setdef1.c: ${OBJS}
@echo Generating linker sets
- @./gensetdefs ${OBJS} >setdefs.h
-
-gensetdefs: gensetdefs.o
- ${CC} -static gensetdefs.o -o $@
-
-gensetdefs.o: gensetdefs.c
- ${CC} -c $<
+ @gensetdefs ${OBJS}
beforedepend ${OBJS}: machine
diff --git a/sys/boot/arc/loader/setdef0.c b/sys/boot/arc/loader/setdef0.c
deleted file mode 100644
index 942b90e..0000000
--- a/sys/boot/arc/loader/setdef0.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * Copyright (c) 1997 John D. Polstra
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef __ELF__
-
-#include <sys/param.h>
-
-/*
- * DEFINE_SET creates the section and label for a set, and emits the
- * count word at the front of it.
- */
-#define DEFINE_SET(set, count) \
- __asm__(".section .set." #set ",\"aw\""); \
- __asm__(".globl " #set); \
- __asm__(".type " #set ",@object"); \
- __asm__(".p2align 3"); \
- __asm__(#set ":"); \
- __asm__(".quad " #count); \
- __asm__(".previous")
-
-#include "setdefs.h" /* Contains a `DEFINE_SET' for each set */
-
-#endif /* __ELF__ */
diff --git a/sys/boot/arc/loader/setdef1.c b/sys/boot/arc/loader/setdef1.c
deleted file mode 100644
index 13668f0..0000000
--- a/sys/boot/arc/loader/setdef1.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 1997 John D. Polstra
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef __ELF__
-
-/*
- * DEFINE_SET emits the NULL terminator for a set.
- */
-#define DEFINE_SET(set, count) \
- __asm__(".section .set." #set ",\"aw\""); \
- __asm__(".quad 0"); \
- __asm__(".previous")
-
-#include "setdefs.h" /* Contains a `DEFINE_SET' for each set */
-
-#endif /* __ELF__ */
OpenPOWER on IntegriCloud