diff --git a/configure/os/CONFIG.RHEL10-x86_64.RHEL8-x86_64 b/configure/os/CONFIG.RHEL10-x86_64.RHEL8-x86_64 index 1ddec0cdd..a16da246f 100644 --- a/configure/os/CONFIG.RHEL10-x86_64.RHEL8-x86_64 +++ b/configure/os/CONFIG.RHEL10-x86_64.RHEL8-x86_64 @@ -21,5 +21,6 @@ CPPFLAGS += $(WRAPPER) AR = ar -rc RANLIB = ranlib -# Allow to run cross-tests which expect different lib versions -export LD_PRELOAD=$(SYSROOT)/lib64/libreadline.so +# Allow RHEL8 EPICS programs to find older libraries +# --disable-new-dtags extends -rpath to indirect depencencies +LDFLAGS += -Wl,--disable-new-dtags -Wl,-rpath=/lib64:$(SYSROOT)/lib64 -Wl,-rpath-link,$(SYSROOT)/lib64 diff --git a/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 b/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 index 1ddec0cdd..a16da246f 100644 --- a/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 +++ b/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 @@ -21,5 +21,6 @@ CPPFLAGS += $(WRAPPER) AR = ar -rc RANLIB = ranlib -# Allow to run cross-tests which expect different lib versions -export LD_PRELOAD=$(SYSROOT)/lib64/libreadline.so +# Allow RHEL8 EPICS programs to find older libraries +# --disable-new-dtags extends -rpath to indirect depencencies +LDFLAGS += -Wl,--disable-new-dtags -Wl,-rpath=/lib64:$(SYSROOT)/lib64 -Wl,-rpath-link,$(SYSROOT)/lib64 diff --git a/epics-base.spec b/epics-base.spec index f3c8081cd..b67255e83 100644 --- a/epics-base.spec +++ b/epics-base.spec @@ -90,6 +90,7 @@ Contains headers etc to build EPICS host applications. %package compat Summary: EPICS base %{EpicsVersion} for older RHEL versions Requires: %{name} = %{version}-%{release} +Requires: gfa-cross-compiler-links AutoReqProv: no %description compat @@ -232,13 +233,8 @@ shopt -s extglob /bin/sed 's!@EPICS_BASE@!%{prog_folder}!g;s!@EPICS_HOST_ARCH@!%{epics_host_arch}!g' epics-base.sh > %{buildroot}%{prog_folder}/bin/epics-base.sh chmod +x %{buildroot}%{prog_folder}/bin/epics-base.sh -# copy over old libraries for compatibility -%if 0%{?rhel} > 8 -%{__cp} /opt/RHEL8/lib64/libreadline.so.7 %{buildroot}%{prog_folder}/lib/RHEL8-x86_64 -%endif - # Do not use install section because build already installed -# and install will delete our buildroot! +# and install would delete our buildroot! %clean %make_build INSTALL_LOCATION=%{buildroot}%{prog_folder} realclean