pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/archivers/zip zip: Support MKPIE on i386. Move compile...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c9bab6f96a4f
branches:  trunk
changeset: 459136:c9bab6f96a4f
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu Sep 30 11:39:27 2021 +0000

description:
zip: Support MKPIE on i386. Move compiler bug hacks to hacks.mk.

diffstat:

 archivers/zip/Makefile |  10 ++++++----
 archivers/zip/hacks.mk |  14 ++++++++++++++
 2 files changed, 20 insertions(+), 4 deletions(-)

diffs (49 lines):

diff -r 95963479e4f5 -r c9bab6f96a4f archivers/zip/Makefile
--- a/archivers/zip/Makefile    Thu Sep 30 11:17:10 2021 +0000
+++ b/archivers/zip/Makefile    Thu Sep 30 11:39:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.64 2015/08/28 08:17:38 richard Exp $
+# $NetBSD: Makefile,v 1.65 2021/09/30 11:39:27 nia Exp $
 
 DISTNAME=      zip30
 PKGNAME=       zip-3.0
@@ -19,9 +19,6 @@
 MAKE_FLAGS+=   LOCAL_ZIP=${CFLAGS:Q}
 MAKE_FLAGS+=   LFLAGS1=${_STRIPFLAG_CC:Q}
 MAKE_FLAGS+=   -DUNICODE_SUPPORT
-.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc"
-CFLAGS+=       -O0
-.endif
 
 .include "../../mk/compiler.mk"
 
@@ -32,6 +29,11 @@
 CFLAGS+=       -O
 .endif
 
+.if ${MACHINE_ARCH} == "i386" && ${PKGSRC_MKPIE:tl} != "no"
+# Text relocations
+MAKE_FLAGS+=   DISABLE_ASM=YES
+.endif
+
 .if !empty(PKGSRC_COMPILER:Msunpro)
 MAKE_FLAGS+=   DISABLE_ASM=YES
 .endif
diff -r 95963479e4f5 -r c9bab6f96a4f archivers/zip/hacks.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/zip/hacks.mk    Thu Sep 30 11:39:27 2021 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: hacks.mk,v 1.1 2021/09/30 11:39:27 nia Exp $
+
+.if !defined(ZIP_HACKS_MK)
+ZIP_HACKS_MK=  # defined
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
+PKG_HACKS+=    disable-opt
+
+# This was added in 2003 to work around a compiler bug...
+# is it still even required?
+CFLAGS+=       -O0
+.endif
+
+.endif # ZIP_HACKS_MK



Home | Main Index | Thread Index | Old Index