summaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2023-01-19 11:46:42 +0100
committerBaptiste Daroussin <bapt@FreeBSD.org>2023-01-19 11:51:05 +0100
commitc79ec8590bf684ccbf958adfca966d6590649539 (patch)
tree553a096322e97b74b1e369c6ac735a78ee425ef3 /ports-mgmt
parentFeatures/pie: allow static-pie: (diff)
ports-mgmt/pkg: with build with WITH_PIE
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-src_Makefile.autosetup11
2 files changed, 12 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 6fa9ee88487f..8e95f12c4606 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -24,6 +24,7 @@ CONFIGURE_ENV= CC_FOR_BUILD="${CC}"
USE_SUBMAKE= yes
CFLAGS+= -Wno-error
CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234
+MAKE_ARGS+= STATIC_ARG="${STATIC_PIE_ARG}"
OPTIONS_DEFINE= DOCS
diff --git a/ports-mgmt/pkg/files/patch-src_Makefile.autosetup b/ports-mgmt/pkg/files/patch-src_Makefile.autosetup
new file mode 100644
index 000000000000..4c3991975e7f
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-src_Makefile.autosetup
@@ -0,0 +1,11 @@
+--- src/Makefile.autosetup.orig 2022-12-11 18:22:41 UTC
++++ src/Makefile.autosetup
+@@ -93,7 +93,7 @@ pkg-static: $(OBJS) $(top_builddir)/libpkg/libpkg_flat
+ install: install-static
+
+ pkg-static: $(OBJS) $(top_builddir)/libpkg/libpkg_flat.a
+- $(CC) -o $@ $(OBJS) $(STATIC_ARG) $(LDFLAGS) $(STATIC_LDFLAGS)
++ $(CC) -o $@ $(OBJS) $(STATIC_ARG) $(STATIC_LDFLAGS)
+
+ install-static: pkg-static
+ install -d -m 755 $(DESTDIR)$(sbindir)