mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Switch Linux docker build from ubuntu to debian.
This commit is contained in:
parent
fc362ecb46
commit
7c1691bbeb
@ -1,4 +1,4 @@
|
||||
ARG ARG_BASE=arm64v8/ubuntu:23.10
|
||||
ARG ARG_BASE=arm64v8/debian:bookworm
|
||||
ARG ARG_TARGET_ARCH=aarch64-pc-linux-gnu
|
||||
ARG ARG_CTNF_CONFIG=crosstool-ng-config-arm64
|
||||
|
||||
@ -15,7 +15,7 @@ ARG ARG_CTNG_UID=1000
|
||||
ARG ARG_CTNG_GID=1000
|
||||
|
||||
|
||||
FROM ubuntu:23.10 as builder
|
||||
FROM debian:bookworm as builder
|
||||
|
||||
ARG ARG_TARGET_ARCH
|
||||
ARG ARG_CTNF_CONFIG
|
||||
@ -32,8 +32,7 @@ ARG ARG_CPUCOUNT
|
||||
ARG ARG_CTNG_UID
|
||||
ARG ARG_CTNG_GID
|
||||
|
||||
RUN userdel -r ubuntu && \
|
||||
groupadd -g $ARG_CTNG_GID ctng && \
|
||||
RUN groupadd -g $ARG_CTNG_GID ctng && \
|
||||
useradd -d /home/ctng -m -g $ARG_CTNG_GID -u $ARG_CTNG_UID -s /bin/bash ctng && \
|
||||
\
|
||||
{ echo 'tzdata tzdata/Areas select Etc'; echo 'tzdata tzdata/Zones/Etc select UTC'; } | debconf-set-selections && \
|
||||
@ -111,7 +110,7 @@ RUN sudo apt-get -y remove \
|
||||
libtomcrypt-dev && \
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH "/home/ctng/x-tools/x86_64-pc-linux-gnu/bin:${PATH}"
|
||||
ENV PATH "/home/ctng/x-tools/x86_64-pc-linux-gnu/bin:/home/ctng/x-tools/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sysroot/usr/local/bin:${PATH}"
|
||||
ENV PATH "/home/ctng/x-tools/${ARG_TARGET_ARCH}/bin:/home/ctng/x-tools/${ARG_TARGET_ARCH}/${ARG_TARGET_ARCH}/sysroot/usr/local/bin:${PATH}"
|
||||
|
||||
RUN cd ~/build && \
|
||||
@ -186,22 +185,20 @@ RUN cd ~/build && \
|
||||
tar xvf icu4c-${ARG_ICU_VERSION}-src.tgz --strip 1 -C icu4c-${ARG_ICU_VERSION}-src && \
|
||||
mkdir icu4c-${ARG_ICU_VERSION}-build-x86_64 && \
|
||||
cd icu4c-${ARG_ICU_VERSION}-build-x86_64 && \
|
||||
../icu4c-${ARG_ICU_VERSION}-src/source/runConfigureICU \
|
||||
CXXFLAGS='-std=c++17 -static-libstdc++' ../icu4c-${ARG_ICU_VERSION}-src/source/runConfigureICU \
|
||||
Linux \
|
||||
--host=x86_64-pc-linux-gnu \
|
||||
CXXFLAGS=-std=c++17 && \
|
||||
--host=x86_64-pc-linux-gnu && \
|
||||
make -j${ARG_CPUCOUNT}
|
||||
|
||||
RUN cd ~/build && \
|
||||
mkdir icu4c-${ARG_ICU_VERSION}-build && \
|
||||
cd icu4c-${ARG_ICU_VERSION}-build && \
|
||||
../icu4c-${ARG_ICU_VERSION}-src/source/runConfigureICU \
|
||||
CXXFLAGS='-std=c++17 -static-libstdc++' ../icu4c-${ARG_ICU_VERSION}-src/source/runConfigureICU \
|
||||
Linux \
|
||||
--host=${ARG_TARGET_ARCH} \
|
||||
--with-cross-build=/home/ctng/build/icu4c-${ARG_ICU_VERSION}-build-x86_64 \
|
||||
--prefix=/home/ctng/x-tools/${ARG_TARGET_ARCH}/${ARG_TARGET_ARCH}/sysroot/usr/local \
|
||||
--includedir=/home/ctng/x-tools/${ARG_TARGET_ARCH}/${ARG_TARGET_ARCH}/sysroot/usr/include \
|
||||
CXXFLAGS=-std=c++17 && \
|
||||
--includedir=/home/ctng/x-tools/${ARG_TARGET_ARCH}/${ARG_TARGET_ARCH}/sysroot/usr/include && \
|
||||
make -j${ARG_CPUCOUNT} && \
|
||||
make install
|
||||
|
||||
@ -221,7 +218,6 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN ln -s /usr/x86_64-linux-gnu/lib64 /lib64 && \
|
||||
userdel -r ubuntu && \
|
||||
groupadd -g $ARG_CTNG_GID ctng && \
|
||||
useradd -d /home/ctng -m -g $ARG_CTNG_GID -u $ARG_CTNG_UID -s /bin/bash ctng
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
docker buildx build \
|
||||
--pull \
|
||||
--build-arg ARG_BASE=arm32v7/ubuntu:23.10 \
|
||||
--build-arg ARG_BASE=arm32v7/debian:bookworm \
|
||||
--build-arg ARG_TARGET_ARCH=arm-pc-linux-gnueabihf \
|
||||
--build-arg ARG_CTNF_CONFIG=crosstool-ng-config-arm32 \
|
||||
-t asfernandes/firebird-builder:fb6-arm32-ng-v1 .
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
docker buildx build \
|
||||
--pull \
|
||||
--build-arg ARG_BASE=arm64v8/ubuntu:23.10 \
|
||||
--build-arg ARG_BASE=arm64v8/debian:bookworm \
|
||||
--build-arg ARG_TARGET_ARCH=aarch64-pc-linux-gnu \
|
||||
--build-arg ARG_CTNF_CONFIG=crosstool-ng-config-arm64 \
|
||||
-t asfernandes/firebird-builder:fb6-arm64-ng-v1 .
|
||||
|
@ -1,4 +1,4 @@
|
||||
ARG ARG_BASE=ubuntu:23.10
|
||||
ARG ARG_BASE=debian:bookworm
|
||||
ARG ARG_SET_ARCH=x86_64
|
||||
ARG ARG_TARGET_ARCH=x86_64-pc-linux-gnu
|
||||
ARG ARG_CTNF_CONFIG=crosstool-ng-config-x64
|
||||
@ -34,8 +34,7 @@ ARG ARG_CPUCOUNT
|
||||
ARG ARG_CTNG_UID
|
||||
ARG ARG_CTNG_GID
|
||||
|
||||
RUN userdel -r ubuntu && \
|
||||
groupadd -g $ARG_CTNG_GID ctng && \
|
||||
RUN groupadd -g $ARG_CTNG_GID ctng && \
|
||||
useradd -d /home/ctng -m -g $ARG_CTNG_GID -u $ARG_CTNG_UID -s /bin/bash ctng && \
|
||||
\
|
||||
{ echo 'tzdata tzdata/Areas select Etc'; echo 'tzdata tzdata/Zones/Etc select UTC'; } | debconf-set-selections && \
|
||||
@ -208,8 +207,7 @@ RUN apt-get update && \
|
||||
xz-utils && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN userdel -r ubuntu && \
|
||||
groupadd -g $ARG_CTNG_GID ctng && \
|
||||
RUN groupadd -g $ARG_CTNG_GID ctng && \
|
||||
useradd -d /home/ctng -m -g $ARG_CTNG_GID -u $ARG_CTNG_UID -s /bin/bash ctng
|
||||
|
||||
USER ctng
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
docker buildx build \
|
||||
--pull \
|
||||
--build-arg ARG_BASE=ubuntu:23.10 \
|
||||
--build-arg ARG_BASE=debian:bookworm \
|
||||
--build-arg ARG_SET_ARCH=x86_64 \
|
||||
--build-arg ARG_TARGET_ARCH=x86_64-pc-linux-gnu \
|
||||
--build-arg ARG_CTNF_CONFIG=crosstool-ng-config-x64 \
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
docker buildx build \
|
||||
--pull \
|
||||
--build-arg ARG_BASE=i386/ubuntu:18.04 \
|
||||
--build-arg ARG_BASE=i386/debian:bookworm \
|
||||
--build-arg ARG_SET_ARCH=i686 \
|
||||
--build-arg ARG_TARGET_ARCH=i586-pc-linux-gnu \
|
||||
--build-arg ARG_CTNF_CONFIG=crosstool-ng-config-x86 \
|
||||
|
@ -187,7 +187,7 @@ ifeq ($(CLIENT_ONLY_FLG),N)
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc
|
||||
endif
|
||||
|
||||
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
|
||||
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LD_FLAGS="$(WLDFLAGS)" $(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)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
|
||||
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(STATIC_LIB)
|
||||
|
@ -203,13 +203,8 @@ AC_LDFLAGS = @LDFLAGS@
|
||||
|
||||
# LINKER COMMANDS
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS)
|
||||
EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS)
|
||||
else
|
||||
LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS) -static-libstdc++
|
||||
EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS) -static-libstdc++
|
||||
endif
|
||||
|
||||
STATICLIB_LINK = $(AR) crus
|
||||
|
||||
|
@ -70,6 +70,10 @@ WCFLAGS = $(WFLAGS) $(CFLAGS) $(AC_CFLAGS) $(GLOB_OPTIONS)
|
||||
WCXXFLAGS = $(WFLAGS) $(PLUSPLUS_FLAGS) $(PLATFORM_PLUSPLUS_FLAGS) $(CXXFLAGS) $(AC_CXXFLAGS) $(GLOB_OPTIONS)
|
||||
WLDFLAGS = $(LDFLAGS) $(AC_LDFLAGS)
|
||||
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
WLDFLAGS += -static-libstdc++
|
||||
endif
|
||||
|
||||
# Here we have definitions for using the preprocessor.
|
||||
|
||||
# The GPRE_FLAGS is overwritten in Makefile.in.jrd Makefile.in.gpre and
|
||||
|
12
extern/cloop/Makefile
vendored
12
extern/cloop/Makefile
vendored
@ -6,7 +6,7 @@ TARGET := release
|
||||
|
||||
CC := $(CC)
|
||||
CXX := $(CXX)
|
||||
LD := $(CXX) -static-libstdc++
|
||||
LD := $(CXX)
|
||||
|
||||
SRC_DIR := src
|
||||
BUILD_DIR := build
|
||||
@ -98,7 +98,7 @@ $(BIN_DIR)/cloop: \
|
||||
$(OBJ_DIR)/cloop/Main.o \
|
||||
| $(BIN_DIR)
|
||||
|
||||
$(LD) $^ -o $@ $(LIBS)
|
||||
$(LD) $(LD_FLAGS) $^ -o $@ $(LIBS)
|
||||
|
||||
$(SRC_DIR)/tests/test1/CalcCApi.h: $(BIN_DIR)/cloop $(SRC_DIR)/tests/test1/Interface.idl
|
||||
$(BIN_DIR)/cloop $(SRC_DIR)/tests/test1/Interface.idl c-header $@ CALC_C_API_H CALC_I
|
||||
@ -125,23 +125,23 @@ $(BIN_DIR)/test1-c$(SHRLIB_EXT): \
|
||||
$(OBJ_DIR)/tests/test1/CalcCApi.o \
|
||||
$(OBJ_DIR)/tests/test1/CTest.o \
|
||||
|
||||
$(LD) $^ -shared $(DL_LIB) -o $@ $(LIBS)
|
||||
$(LD) $(LD_FLAGS) $^ -shared $(DL_LIB) -o $@ $(LIBS)
|
||||
|
||||
$(BIN_DIR)/test1-c$(EXE_EXT): \
|
||||
$(OBJ_DIR)/tests/test1/CalcCApi.o \
|
||||
$(OBJ_DIR)/tests/test1/CTest.o \
|
||||
|
||||
$(LD) $^ $(DL_LIB) -o $@ $(LIBS)
|
||||
$(LD) $(LD_FLAGS) $^ $(DL_LIB) -o $@ $(LIBS)
|
||||
|
||||
$(BIN_DIR)/test1-cpp$(SHRLIB_EXT): \
|
||||
$(OBJ_DIR)/tests/test1/CppTest.o \
|
||||
|
||||
$(LD) $^ -shared $(DL_LIB) -o $@ $(LIBS)
|
||||
$(LD) $(LD_FLAGS) $^ -shared $(DL_LIB) -o $@ $(LIBS)
|
||||
|
||||
$(BIN_DIR)/test1-cpp$(EXE_EXT): \
|
||||
$(OBJ_DIR)/tests/test1/CppTest.o \
|
||||
|
||||
$(LD) $^ $(DL_LIB) -o $@ $(LIBS)
|
||||
$(LD) $(LD_FLAGS) $^ $(DL_LIB) -o $@ $(LIBS)
|
||||
|
||||
$(BIN_DIR)/test1-pascal$(SHRLIB_EXT): \
|
||||
$(SRC_DIR)/tests/test1/PascalClasses.pas \
|
||||
|
Loading…
Reference in New Issue
Block a user