File 6892d82.diff of Package openafs
From 6892d82f8b975830a8a9b8db25866c99efdf36c8 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Tue, 24 Jun 2025 14:50:43 -0600
Subject: [PATCH] rxkad/test: Remove CFLAGS from Makefile
Building the rpms under RHEL10, the link step for
src/rxkad/test/th_stress fails with:
/usr/bin/ld: th_stress.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
This error is because the CFLAGS are hardcoded within the Makefile and
do not contain CFLAGS that are injected by the rpmbuild process,
specifically in this case the -fPIE option.
The Makefile in src/rxkad/test was never updated to work with libtool
and still contains a CFLAGS assignment.
For this particular directory, the default MODULE_CFLAGS can be used, so
the unnecessary CFLAGS assignment can simply be removed.
Reviewed-on: https://gerrit.openafs.org/16404
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit f7b2a385ff1e83c86dfd2ead2d6c05b5b6f3d519)
Change-Id: I3771a13b3c5d097cbaba3e005f080ea3df2aa819
---
diff --git a/src/rxkad/test/Makefile.in b/src/rxkad/test/Makefile.in
index c4f6c43..8762ebd 100644
--- a/src/rxkad/test/Makefile.in
+++ b/src/rxkad/test/Makefile.in
@@ -10,9 +10,6 @@
include @TOP_OBJDIR@/src/config/Makefile.lwp
top_builddir=@TOP_OBJDIR@
-
-CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
-
HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
LIBS=${TOP_LIBDIR}/libauth.a \