mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-03-11 06:54:06 +00:00
commit
42b3dde819
@ -47,17 +47,6 @@ config CC_GCC_MULTILIB_LIST
|
||||
for the format of this option for a particular architecture.
|
||||
Leave empty to use the default list for this architecture.
|
||||
|
||||
config CC_GCC_TARGET_FINAL
|
||||
bool
|
||||
prompt "Use the default targets all and install for the final compiler"
|
||||
default n
|
||||
depends on BARE_METAL
|
||||
help
|
||||
The final GCC for a bare metal system is built by the core gcc script.
|
||||
This script does a lot of tricks to build the core gcc, which are not
|
||||
required for the final gcc build. If you set this flag to true, all the
|
||||
tricks are not done and the compiler is build with all/install.
|
||||
|
||||
config STATIC_TOOLCHAIN
|
||||
bool
|
||||
select CC_GCC_STATIC_LIBSTDCXX
|
||||
|
25
patches/zlib/1.2.11/120-mingw-static-only.patch
Normal file
25
patches/zlib/1.2.11/120-mingw-static-only.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -urpN zlib-1.2.11.orig/win32/Makefile.gcc zlib-1.2.11/win32/Makefile.gcc
|
||||
--- zlib-1.2.11.orig/win32/Makefile.gcc 2017-05-23 18:52:07.937730080 -0700
|
||||
+++ zlib-1.2.11/win32/Makefile.gcc 2017-05-23 19:02:24.068666463 -0700
|
||||
@@ -71,7 +71,11 @@ OBJS = adler32.o compress.o crc32.o defl
|
||||
gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
|
||||
OBJA =
|
||||
|
||||
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe
|
||||
+all: $(STATICLIB) example.exe minigzip.exe
|
||||
+
|
||||
+ifeq ($(SHARED_MODE),1)
|
||||
+all: $(SHAREDLIB) $(IMPLIB) example_d.exe minigzip_d.exe
|
||||
+endif
|
||||
|
||||
test: example.exe minigzip.exe
|
||||
./example
|
||||
@@ -125,7 +129,7 @@ zlibrc.o: win32/zlib1.rc
|
||||
.PHONY: install uninstall clean
|
||||
|
||||
install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
|
||||
- @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \
|
||||
+ @if test -z "$(INCLUDE_PATH)" -o -z "$(LIBRARY_PATH)" -o -z "$(BINARY_PATH)"; then \
|
||||
echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \
|
||||
exit 1; \
|
||||
fi
|
@ -337,10 +337,8 @@ do_gcc_core_backend() {
|
||||
CT_DoLog EXTRA "Configuring final gcc compiler"
|
||||
extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
|
||||
log_txt="final gcc compiler"
|
||||
if [ "${CT_CC_GCC_TARGET_FINAL}" = "y" ]; then
|
||||
# to inhibit the libiberty and libgcc tricks later on
|
||||
build_libgcc=no
|
||||
fi
|
||||
# to inhibit the libiberty and libgcc tricks later on
|
||||
build_libgcc=no
|
||||
;;
|
||||
*)
|
||||
CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'"
|
||||
@ -663,10 +661,8 @@ do_gcc_core_backend() {
|
||||
|
||||
case "${build_step}" in
|
||||
gcc_build|gcc_host)
|
||||
if [ "${CT_CC_GCC_TARGET_FINAL}" = "y" ]; then
|
||||
core_targets_all=all
|
||||
core_targets_install=install
|
||||
fi
|
||||
core_targets_all=all
|
||||
core_targets_install=install
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -76,30 +76,51 @@ do_zlib_backend() {
|
||||
local ldflags
|
||||
local arg
|
||||
local -a extra_config
|
||||
local -a extra_make
|
||||
|
||||
for arg in "$@"; do
|
||||
eval "${arg// /\\ }"
|
||||
done
|
||||
|
||||
CT_DoLog EXTRA "Configuring zlib"
|
||||
case "${host}" in
|
||||
*-mingw32)
|
||||
# zlib treats mingw host differently and requires using a different
|
||||
# makefile rather than configure+make. It also does not support
|
||||
# out-of-tree building.
|
||||
cp -av "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/." .
|
||||
extra_make=( -f win32/Makefile.gcc \
|
||||
PREFIX="${host}-" \
|
||||
SHAREDLIB= \
|
||||
IMPLIB= \
|
||||
LIBRARY_PATH="${prefix}/lib" \
|
||||
INCLUDE_PATH="${prefix}/include" \
|
||||
BINARY_PATH="${prefix}/bin" \
|
||||
prefix="${prefix}" \
|
||||
)
|
||||
;;
|
||||
|
||||
CT_DoExecLog CFG \
|
||||
CFLAGS="${cflags}" \
|
||||
LDFLAGS="${ldflags}" \
|
||||
CHOST="${host}" \
|
||||
${CONFIG_SHELL} \
|
||||
"${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \
|
||||
--prefix="${prefix}" \
|
||||
--static \
|
||||
"${extra_config[@]}"
|
||||
*)
|
||||
CT_DoLog EXTRA "Configuring zlib"
|
||||
|
||||
CT_DoExecLog CFG \
|
||||
CFLAGS="${cflags}" \
|
||||
LDFLAGS="${ldflags}" \
|
||||
CHOST="${host}" \
|
||||
${CONFIG_SHELL} \
|
||||
"${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \
|
||||
--prefix="${prefix}" \
|
||||
--static \
|
||||
"${extra_config[@]}"
|
||||
;;
|
||||
esac
|
||||
|
||||
CT_DoLog EXTRA "Building zlib"
|
||||
CT_DoExecLog ALL make ${JOBSFLAGS}
|
||||
CT_DoExecLog ALL make "${extra_make[@]}" ${JOBSFLAGS}
|
||||
|
||||
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
|
||||
if [ "${host}" = "${CT_BUILD}" ]; then
|
||||
CT_DoLog EXTRA "Checking zlib"
|
||||
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
|
||||
CT_DoExecLog ALL make "${extra_make[@]}" -s test
|
||||
else
|
||||
# Cannot run host binaries on build in a canadian cross
|
||||
CT_DoLog EXTRA "Skipping check for zlib on the host"
|
||||
@ -107,7 +128,7 @@ do_zlib_backend() {
|
||||
fi
|
||||
|
||||
CT_DoLog EXTRA "Installing zlib"
|
||||
CT_DoExecLog ALL make install
|
||||
CT_DoExecLog ALL make "${extra_make[@]}" install
|
||||
}
|
||||
|
||||
fi # CT_ZLIB
|
||||
|
Loading…
x
Reference in New Issue
Block a user