26 lines
904 B
Plaintext
26 lines
904 B
Plaintext
# Include common linux definitions
|
|
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
|
|
|
# "Cross compile" for RHEL8-x86_64
|
|
# Expects RHEL8 RPMs gcc-toolset-12-gcc-c++ and readline-devel
|
|
# to be installed in $(SYSROOT)
|
|
# These can be installed on RHEL8 with:
|
|
# yum install --installroot=$(SYSROOT) <packages>
|
|
# (Assuming $(SYSROOT) is on a shared network volume.)
|
|
|
|
SYSROOT = /opt/RHEL8
|
|
|
|
# "Cross" TOOLSET progs need to find their libraries.
|
|
# But linker gets confused with LD_LIBRARY_PATH.
|
|
# Thus only wrap the compiler.
|
|
WRAPPER = -wrapper env,LD_LIBRARY_PATH=$(TOOLSET_DIR:%=$(SYSROOT)%/usr/lib64:)/usr/lib64:$(SYSROOT)/usr/lib64
|
|
CPPFLAGS += $(WRAPPER)
|
|
|
|
# These programs as cross tools would also need LD_LIBRARY_PATH.
|
|
# But but our host versions work just fine.
|
|
AR = ar -rc
|
|
RANLIB = ranlib
|
|
|
|
# Allow to run cross-tests which expect different lib versions
|
|
export LD_PRELOAD=$(SYSROOT)/lib64/libreadline.so
|