pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/memtestplus fix build with clang ... but mark...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3896a1882081
branches: trunk
changeset: 648844:3896a1882081
user: tnn <tnn%pkgsrc.org@localhost>
date: Sat Mar 21 02:18:39 2015 +0000
description:
fix build with clang ... but mark the package as BROKEN because even though
it builds now, the resulting binary does not boot in qemu.
diffstat:
sysutils/memtestplus/Makefile | 6 +++++-
sysutils/memtestplus/distinfo | 6 ++++--
sysutils/memtestplus/patches/patch-aa | 13 ++++++++++---
sysutils/memtestplus/patches/patch-main.c | 16 ++++++++++++++++
sysutils/memtestplus/patches/patch-reboot.c | 13 +++++++++++++
5 files changed, 48 insertions(+), 6 deletions(-)
diffs (110 lines):
diff -r 6ea69942126c -r 3896a1882081 sysutils/memtestplus/Makefile
--- a/sysutils/memtestplus/Makefile Sat Mar 21 01:17:08 2015 +0000
+++ b/sysutils/memtestplus/Makefile Sat Mar 21 02:18:39 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2014/06/04 16:07:34 gdt Exp $
+# $NetBSD: Makefile,v 1.20 2015/03/21 02:18:39 tnn Exp $
#
# Note -- version number also in the do-install rule
@@ -40,6 +40,10 @@
BUILDLINK_TRANSFORM+= rm:-fno-stack-protector
.endif
+.if !empty(PKGSRC_COMPILER:Mclang)
+BROKEN+= ${PKGNAME} does not produce a working binary with clang
+.endif
+
do-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/mdec
${INSTALL_DATA} ${WRKSRC}/memtest.bin \
diff -r 6ea69942126c -r 3896a1882081 sysutils/memtestplus/distinfo
--- a/sysutils/memtestplus/distinfo Sat Mar 21 01:17:08 2015 +0000
+++ b/sysutils/memtestplus/distinfo Sat Mar 21 02:18:39 2015 +0000
@@ -1,11 +1,13 @@
-$NetBSD: distinfo,v 1.10 2013/12/08 00:35:28 jakllsch Exp $
+$NetBSD: distinfo,v 1.11 2015/03/21 02:18:39 tnn Exp $
SHA1 (memtest86+-5.01.tar.gz) = eb4b6d70114db3c9ed320785da44c0ba8349c10c
RMD160 (memtest86+-5.01.tar.gz) = 756b57d8f8a3b7408aba0b2fc0cadcdc1df966df
Size (memtest86+-5.01.tar.gz) = 214877 bytes
-SHA1 (patch-aa) = 2f49c00b162a3f5f7c9f94808d1246d283b8e9f6
+SHA1 (patch-aa) = df9482d024449c6fc853f01a90b045e139d07430
SHA1 (patch-ab) = 04ca819d23656c5a73625b457ad730c0cf33e751
SHA1 (patch-ac) = 9186952e34139b4d4aab6c266a224921a4d39659
SHA1 (patch-ad) = ab31fec30052fdd3c473ee885ba00d7e3676384f
+SHA1 (patch-main.c) = 82e1830d119394f83fa4fd69d492bcc38fe8946f
SHA1 (patch-makeiso.sh) = 939056a96a1384e4d27772bf5612a755deca8145
SHA1 (patch-nbstart.S) = d97a6e9c25a57d0f5510c3acf4dccf0f0c0c31b0
+SHA1 (patch-reboot.c) = 8103cb52d1a6e2cdb9099ad3535115617746ed26
diff -r 6ea69942126c -r 3896a1882081 sysutils/memtestplus/patches/patch-aa
--- a/sysutils/memtestplus/patches/patch-aa Sat Mar 21 01:17:08 2015 +0000
+++ b/sysutils/memtestplus/patches/patch-aa Sat Mar 21 02:18:39 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.5 2013/12/08 00:35:28 jakllsch Exp $
+$NetBSD: patch-aa,v 1.6 2015/03/21 02:18:39 tnn Exp $
--- Makefile.orig 2013-08-10 02:01:58.000000000 +0000
+++ Makefile
@@ -11,7 +11,7 @@
AS=as -32
CC=gcc
-@@ -20,8 +20,7 @@ OBJS= head.o reloc.o main.o test.o init.
+@@ -20,22 +20,24 @@ OBJS= head.o reloc.o main.o test.o init.
smp.o vmem.o random.o
@@ -21,7 +21,14 @@
# Link it statically once so I know I don't have undefined
# symbols and then link it dynamically so I have full
-@@ -34,8 +33,11 @@ memtest_shared: $(OBJS) memtest_shared.l
+ # relocation information
+ memtest_shared: $(OBJS) memtest_shared.lds Makefile
+- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \
++ $(LD) --allow-multiple-definition --warn-constructors --warn-common -static -T memtest_shared.lds \
+ -o $@ $(OBJS) && \
+- $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
++ $(LD) --allow-multiple-definition -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+
memtest_shared.bin: memtest_shared
objcopy -O binary $< memtest_shared.bin
diff -r 6ea69942126c -r 3896a1882081 sysutils/memtestplus/patches/patch-main.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/patches/patch-main.c Sat Mar 21 02:18:39 2015 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-main.c,v 1.1 2015/03/21 02:18:39 tnn Exp $
+
+--- main.c.orig 2013-08-10 02:01:58.000000000 +0000
++++ main.c
+@@ -217,7 +217,11 @@ static void run_at(unsigned long addr, i
+ spin_lock(&barr->mutex);
+
+ /* Jump to the start address */
++#ifdef __clang__
++ asm volatile ("jmp *%0" : : "a" (ja));
++#else
+ goto *ja;
++#endif
+ }
+
+ /* Switch from the boot stack to the main stack. First the main stack
diff -r 6ea69942126c -r 3896a1882081 sysutils/memtestplus/patches/patch-reboot.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/patches/patch-reboot.c Sat Mar 21 02:18:39 2015 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-reboot.c,v 1.1 2015/03/21 02:18:39 tnn Exp $
+
+--- lib.c.orig 2013-08-10 02:01:58.000000000 +0000
++++ lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+ int keycode;
+ };
+
+-inline void reboot(void)
++void reboot(void)
+ {
+
+ /* tell the BIOS to do a cold start */
Home |
Main Index |
Thread Index |
Old Index