sys-cluster/parallel-netcdf: restrict tests, respect flags

Closes: https://bugs.gentoo.org/835036
Closes: https://bugs.gentoo.org/815742
Closes: https://bugs.gentoo.org/815739
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-03-31 16:35:04 +02:00
parent 925cfef4c8
commit b10cbd7216
3 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
--- a/src/utils/ncmpidiff/Makefile.am
+++ b/src/utils/ncmpidiff/Makefile.am
@@ -18,7 +18,7 @@
cdfdiff_SOURCES = cdfdiff.c
cdfdiff$(EXEEXT): cdfdiff.c Makefile
- $(SEQ_CC) -I$(top_srcdir)/src/utils/ncvalidator -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE -I$(top_srcdir)/src/utils/ncvalidator -o $@ $<
$(top_builddir)/src/libs/libpnetcdf.la:
set -e; cd $(top_builddir)/src/libs && $(MAKE) $(MFLAGS)
--- a/src/utils/ncoffsets/Makefile.am
+++ b/src/utils/ncoffsets/Makefile.am
@@ -10,7 +10,7 @@
EXTRA_DIST = ncoffsets.c
ncoffsets$(EXEEXT): ncoffsets.c
- $(SEQ_CC) -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE -o $@ $<
dist_man_MANS = ncoffsets.1
--- a/src/utils/ncvalidator/Makefile.am
+++ b/src/utils/ncvalidator/Makefile.am
@@ -76,7 +76,7 @@
TST_HDF5_FILES = pad_superblock.h5
ncvalidator$(EXEEXT): ncvalidator.c Makefile
- $(SEQ_CC) -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE -o $@ $<
# autimake 1.11.3 has not yet implemented AM_TESTS_ENVIRONMENT
# For newer versions, we can use AM_TESTS_ENVIRONMENT instead
--- a/src/utils/pnetcdf_version/Makefile.am
+++ b/src/utils/pnetcdf_version/Makefile.am
@@ -22,7 +22,7 @@
endif
pnetcdf_version$(EXEEXT): pnetcdf_version.c
- $(SEQ_CC) $(XDEFS) -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE $(XDEFS) -o $@ $<
dist_man_MANS = pnetcdf_version.1