mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 13:23:03 +01:00
Allow to build using prefixed toolchain (configure --host).
This commit is contained in:
parent
cac5051bf9
commit
a47a1699af
@ -93,13 +93,13 @@ buildDebugInfo: buildRoot
|
||||
for x in `(cd $(GEN_ROOT)/buildroot; find)`; do \
|
||||
FIL=$(GEN_ROOT)/buildroot/$$x; \
|
||||
D_FIL=$(GEN_ROOT)/$(DebugDir)/`dirname $${x}`/.debug/`basename $${x}`.debug; \
|
||||
if [ ! -h $$FIL ] && readelf -h $$FIL > /dev/null 2> /dev/null; then \
|
||||
if [ ! -h $$FIL ] && $(READELF) -h $$FIL > /dev/null 2> /dev/null; then \
|
||||
mkdir -p $(GEN_ROOT)/$(DebugDir)/`dirname $$x`/.debug; \
|
||||
echo Generating external debug info for $$x; \
|
||||
cp $${FIL} $${D_FIL}; \
|
||||
objcopy --add-gnu-debuglink=$${D_FIL} $${FIL}; \
|
||||
$(OBJCOPY) --add-gnu-debuglink=$${D_FIL} $${FIL}; \
|
||||
echo Stripping unneeded symbols from $${x}; \
|
||||
objcopy --strip-debug --strip-unneeded $${FIL}; \
|
||||
$(OBJCOPY) --strip-debug --strip-unneeded $${FIL}; \
|
||||
fi; \
|
||||
done
|
||||
(cd $(GEN_ROOT)/$(DebugDir); mkdir -p ./$(MiscDir); \
|
||||
|
@ -37,7 +37,7 @@ TargetDir=buildroot # Where we want to build the install image
|
||||
SecurityDatabase=security5.fdb
|
||||
TomMathBuild="@TOMMATH_BUILD@"
|
||||
TomCryptBuild="@TOMCRYPT_BUILD@"
|
||||
|
||||
OBJDUMP=@OBJDUMP@
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# addLibs
|
||||
@ -55,9 +55,9 @@ addLibs() {
|
||||
echo "#!/bin/sh" >>$libTarget
|
||||
echo >>$libTarget
|
||||
|
||||
LIB=`objdump -p $libSdir/firebird|grep NEEDED|grep tomcrypt|awk '{print $2;}'`
|
||||
LIB=`$OBJDUMP -p $libSdir/firebird|grep NEEDED|grep tomcrypt|awk '{print $2;}'`
|
||||
[ "$LIB" ] && echo "export LIBTOMCRYPT=$LIB" >>$libTarget
|
||||
LIB=$(echo `objdump -p $libSdir/isql|grep NEEDED|egrep "(curses|termcap|tinfo)"|awk '{print $2;}'`)
|
||||
LIB=$(echo `$OBJDUMP -p $libSdir/isql|grep NEEDED|egrep "(curses|termcap|tinfo)"|awk '{print $2;}'`)
|
||||
[ "$LIB" ] && echo "export LIBCURSES='$LIB'" >>$libTarget
|
||||
echo >>$libTarget
|
||||
|
||||
|
@ -174,10 +174,10 @@ $(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
|
||||
#
|
||||
|
||||
external:
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/btyacc
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop core
|
||||
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(LIB)
|
||||
|
||||
ifeq ($(ABSEIL_BUILD_FLG),Y)
|
||||
@ -186,12 +186,12 @@ ifeq ($(ABSEIL_BUILD_FLG),Y)
|
||||
endif
|
||||
|
||||
ifeq ($(RE2_BUILD_FLG),Y)
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -O3 -g -fPIC" $(MAKE) -C $(ROOT)/extern/re2
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -O3 -g -fPIC" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/re2
|
||||
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
|
||||
endif
|
||||
|
||||
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC=$(GCC)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC="$(CC)"
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
install_name_tool -id "@rpath/lib/libtommath.dylib" $(TOMMATH)/.libs/libtommath.0.dylib
|
||||
@ -203,7 +203,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(TOMCRYPT_BUILD_FLG),Y)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS) $(TOM2TOM_CFLAGS)" $(MAKE) -C $(ROOT)/extern/libtomcrypt -f makefile.shared GCC=$(GCC) LTC_LDFLAGS=$(LTC_LDFLAGS)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS) $(TOM2TOM_CFLAGS)" $(MAKE) -C $(ROOT)/extern/libtomcrypt -f makefile.shared GCC="$(CC)" LTC_LDFLAGS=$(LTC_LDFLAGS)
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
install_name_tool -id "@rpath/lib/libtomcrypt.dylib" $(TOMCRYPT)/.libs/libtomcrypt.1.dylib
|
||||
@ -216,7 +216,7 @@ endif
|
||||
|
||||
ifeq ($(STD_EDITLINE),false)
|
||||
ifeq ($(EDITLINE_FLG),Y)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -339,7 +339,7 @@ cross2:
|
||||
$(MAKE) tommath
|
||||
$(MAKE) LTCSOURCE=-DLTC_SOURCE tomcrypt
|
||||
$(MAKE) re2
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB)
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/int128/absl/numeric
|
||||
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128$(CROSS).a $(LIB)
|
||||
|
@ -181,9 +181,12 @@ RANLIB= @RANLIB@
|
||||
BTYACC=$(ROOT)/extern/btyacc/btyacc
|
||||
CLOOP=$(GEN_ROOT)/$(TARGET)/cloop/release/bin/cloop
|
||||
|
||||
AR = @AR@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
LD = @CXX@
|
||||
OBJCOPY = @OBJCOPY@
|
||||
READELF = @READELF@
|
||||
|
||||
AC_CFLAGS = @CFLAGS@
|
||||
AC_CXXFLAGS = @CXXFLAGS@
|
||||
|
@ -794,6 +794,8 @@ AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_TOOL([OBJCOPY], [objcopy])
|
||||
AC_CHECK_TOOL([READELF], [readelf])
|
||||
LT_INIT([dlopen win32-dll])
|
||||
|
||||
dnl Check for system header files
|
||||
@ -1283,7 +1285,7 @@ AC_SUBST(SFIO_LDFLAGS)
|
||||
AC_SUBST(SFIO_EXAMPLES)
|
||||
|
||||
dnl The following file defines the version number strings. Specially for install/uninstall routines
|
||||
. ./src/misc/writeBuildNum.sh
|
||||
CXX="$CXX" . ./src/misc/writeBuildNum.sh
|
||||
|
||||
AC_SUBST(FIREBIRD_VERSION)
|
||||
AC_SUBST(FIREBIRD_PACKAGE_VERSION)
|
||||
|
10
extern/cloop/Makefile
vendored
10
extern/cloop/Makefile
vendored
@ -61,10 +61,14 @@ $1/%.o: %.cpp | $1
|
||||
$(CXX) -c $$(CXX_FLAGS) $$< -o $$@
|
||||
endef
|
||||
|
||||
.PHONY: all mkdirs clean
|
||||
.PHONY: all core mkdirs clean
|
||||
|
||||
all: mkdirs \
|
||||
$(BIN_DIR)/cloop \
|
||||
all: core tests
|
||||
|
||||
core: mkdirs \
|
||||
$(BIN_DIR)/cloop
|
||||
|
||||
tests: mkdirs \
|
||||
$(BIN_DIR)/test1-c$(SHRLIB_EXT) \
|
||||
$(BIN_DIR)/test1-c$(EXE_EXT) \
|
||||
$(BIN_DIR)/test1-cpp$(SHRLIB_EXT) \
|
||||
|
2
extern/editline/src/Makefile.in
vendored
2
extern/editline/src/Makefile.in
vendored
@ -95,7 +95,7 @@ srcdir = .
|
||||
|
||||
BUILT_SOURCES = vi.h emacs.h common.h fcns.h help.h fcns.c help.c \
|
||||
$(append_1)
|
||||
AHDR = vi.h emacs.h common.h
|
||||
AHDR = vi.h emacs.h common.h
|
||||
ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
LIBRARY = libedit.a
|
||||
|
2
extern/libtommath/makefile.shared
vendored
2
extern/libtommath/makefile.shared
vendored
@ -94,7 +94,7 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o
|
||||
objs: $(OBJECTS)
|
||||
|
||||
$(LIBNAME): $(OBJECTS)
|
||||
$(LIBTOOL) --mode=link --tag=CC gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
|
||||
$(LIBTOOL) --mode=link --tag=CC $(GCC) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
|
||||
|
||||
install: $(LIBNAME)
|
||||
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
|
||||
|
Loading…
Reference in New Issue
Block a user