summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-08-05 09:08:41 +0200
committerHelge Deller <deller@gmx.de>2022-08-05 10:43:48 +0200
commit481730378db534d0816a68b4650864ad9db17f0f (patch)
tree4d446993c0558863ada1b570ae2661dc393b95dd
parentb7736781cb0c3386343f1360308f7f1296f4cacd (diff)
downloadpalo-481730378db534d0816a68b4650864ad9db17f0f.tar.gz
ipl: Add check to avoid __udivdi3 and __umoddi3 in palo ipl code
Add a Makefile check to abort the make if we find those millicode routines in the palo binary. Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--ipl/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipl/Makefile b/ipl/Makefile
index 2254887..3409868 100644
--- a/ipl/Makefile
+++ b/ipl/Makefile
@@ -28,6 +28,7 @@ CROSS_COMPILE := $(call cc-cross-prefix, \
CC = ${CROSS_COMPILE}gcc
AR = ar
LD = ${CROSS_COMPILE}ld
+OBJDUMP = ${CROSS_COMPILE}objdump
ifneq ("$(wildcard /etc/debian_version)","")
BLDINFO := $(shell echo https://parisc.wiki.kernel.org - `dpkg-parsechangelog -l../debian/changelog -SDate`)
@@ -39,7 +40,7 @@ endif
VPATH=../lib:.
AFLAGS = -I../lib
-CFLAGS = -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks -fno-builtin
+CFLAGS = -DIPL_LOADER -I. -I../lib -I../include -O2 -mdisable-fpregs -Wall -fno-delete-null-pointer-checks -fno-builtin -mpa-risc-1-0
LDFLAGS = -N --section-start .init=0x60000 -e '$$START$$'
all: iplelf
@@ -49,6 +50,7 @@ iplelf: crt0.o ipl.a
$(CC) $(CFLAGS) -c -o build.o build.c
-rm -f build.c
$(LD) $(LDFLAGS) -o iplelf crt0.o ipl.a build.o `$(CC) -print-libgcc-file-name`
+ $(OBJDUMP) -t iplelf | grep -E '__udivdi3|__umoddi3|__muldi3' && (echo "ERROR: Can not use __udivdi3 or __umoddi3 in palo ipl code" && false) || true
ipl.a: $(OFILES)
$(AR) rv ipl.a $?