From 95162014754fca037510884f5a3c0c73988cd902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 9 Jun 2016 18:58:37 +0000 Subject: Adds and integrates slibtool: - Adds ${PKG_SLIBTOOL}. - pkg.build: export ${MAKE} as `make LIBTOOL=${PKG_SLIBTOOL}'. - binutils{_host,}: use slibtool-static. - git: add NEEDS_SSL_WITH_CURL=1 to ${PKG_GIT_MAKEFLAGS_BUILD_EXTRA}. - pacman-5.0.1: add `LIBALPM_LIBS=-lssl -lbz2 -llzma -lz' to ${PKG_PACMAN_ENV_VARS_EXTRA}; Makefile.am patch. Introduces 32-bit (i686-nt32-midipix) support, selected by ARCH=nt32 and defaulting to 64-bit builds: - Create ${PREFIX_TARGET}/lib. - Remove ${PREFIX_TARGET} when cleaning the prefix if -c has been specified. - Set ${HOST_NATIVE}, ${TARGET}, and ${TARBALL_{SRC_,}FNAME_PREFIX} from ${ARCH}. - pkg.build: use ${TARGET}-dlltool instead of x86_64-nt64-midipix-dlltool. - glib-2.46.2: broken at present. - libffi-3.2.1/src/x86/win32.S: fix symbol prefix. - musl-1.1.12/arch/nt32/bits/syscall.h: copied from musl-1.1.12/arch/nt64/bits/syscall.h. - perl-5.22.1: Set --target from ${TARGET}. Bug fixes: - psxstub: make {_,__}so_entry_point weak symbols to express preference for the real psxscl shared object. - bash-4.3: fix lib/intl/libgnuintl.h issue. - libarchive-3.1.2: import FreeBSD-SA-16:23.libarchive and FreeBSD-SA-16:22.libarchive security fixes. Include all directories beneath ${WORKDIR} in the source tarball. Updated TODO list at the end of README. --- 008.gcc.full.build | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 008.gcc.full.build (limited to '008.gcc.full.build') diff --git a/008.gcc.full.build b/008.gcc.full.build new file mode 100644 index 00000000..4c7f6f24 --- /dev/null +++ b/008.gcc.full.build @@ -0,0 +1,151 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +# Order: stage1, runtime, full, native + +if [ "${3}" = runtime ]\ +|| [ "${3}" = full ]; then + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + cd ${PKG_BUILD_DIR}; + if [ "${3}" = runtime ]; then + # GCC, compiler runtime. + if ! is_build_script_done build; then + make ${MAKEFLAGS} all-target-libgcc; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install-target-libgcc; + set_build_script_done install finish; + fi; + elif [ "${3}" = full ]; then + # GCC, everything else. + if ! is_build_script_done build1; then + make ${MAKEFLAGS} all-target-libstdc++-v3; + set_build_script_done build1 -install1; + fi; + if ! is_build_script_done install1; then + make ${MAKEFLAGS} install-target-libstdc++-v3; + set_build_script_done install1 -build2; + fi; + if ! is_build_script_done build2; then + make ${MAKEFLAGS}; + set_build_script_done build2 -install2; + fi; + if ! is_build_script_done install2; then + make ${MAKEFLAGS} install; + set_build_script_done install2 finish; + fi; + fi; +else + if [ "${3}" = stage1 ]; then + # GCC, stage1. + if ! is_build_script_done fetch; then + fetch_git cbb-gcc-${PKG_GCC_VERSION} \ + ${GITROOT}/cbb/cbb-gcc-${PKG_GCC_VERSION}; + set_build_script_done fetch -configure; + fi; + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + export cbb_ldflags_for_target=--sysroot=${PREFIX_LVL} \ + cbb_sysroot_for_libgcc=${PREFIX_LVL} \ + cbb_target=${TARGET} \ + cbb_neutral_libiberty=no \ + cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_LVL}"; + elif [ "${3}" = native ]; then + # GCC, native. + set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; + export cbb_ldflags_for_target=--sysroot=${PREFIX_LVL} \ + cbb_sysroot_for_libgcc=${PREFIX_LVL} \ + cbb_target=${TARGET} \ + cbb_xgcc_for_specs=${TARGET}-gcc; + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_LVL}"; + fi; + GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)"; + set_env_vars "${GCCFLAGS}" CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; + set_env_vars "${GCCTARGET_FLAGS}" CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; + set_env_vars "${CFLAGS_FOR_BUILD}" cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; + export CFLAGS CXXFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET; + if ! is_build_script_done configure; then + if [ "${3}" = stage1 ]; then + mkdir -p ${PREFIX_LVL}/include; + [ \! -d ${PREFIX_LVL}/usr ] && \ + ln -s . ${PREFIX_LVL}/usr; + _configure_args="--prefix=${PREFIX} --with-sysroot=${PREFIX_LVL}"; + elif [ "${3}" = native ]; then + mkdir -p ${PREFIX_LVL}/${TARGET}; + if [ \! -d ${PREFIX_LVL}/${TARGET}/usr ]; then + ln -s . ${PREFIX_LVL}/${TARGET}/usr; + fi; + if [ "${ARCH}" = nt32 ]; then + _configure_args="--host=i686-nt32-midipix"; + else + _configure_args="--host=x86_64-nt64-midipix"; + fi; + _configure_args="${_configure_args} \ + --prefix=/ \ + --with-elf=${PREFIX_LVL} \ + --with-gmp=${PREFIX_LVL} \ + --with-mpc=${PREFIX_LVL} \ + --with-mpfr=${PREFIX_LVL} \ + --with-sysroot="; + fi; + rm_if_exists -m -c ${PKG_BUILD_DIR}; + ../cbb-gcc-${PKG_GCC_VERSION}/configure \ + --disable-bootstrap \ + --disable-libmudflap \ + --disable-multilib \ + --disable-nls \ + --disable-obsolete \ + --disable-sjlj-exceptions \ + --disable-symvers \ + --enable-canonical-system-headers \ + --enable-__cxa_atexit \ + --enable-debug \ + --enable-gnu-indirect-function \ + --enable-gnu-unique-object \ + --enable-initfini-array \ + --enable-languages=c,c++,objc,lto \ + --enable-libstdcxx-debug \ + --enable-lto \ + --enable-multiarch \ + --enable-secureplt \ + --enable-shared \ + --enable-threads=posix \ + --target=${TARGET} \ + --with-fpmath=sse \ + ${_configure_args}; + set_build_script_done configure clean -build; + else + cd ${PKG_BUILD_DIR}; + fi; + if ! is_build_script_done clean; then + make ${MAKEFLAGS} clean; + set_build_script_done clean -build; + fi; + if ! is_build_script_done build; then + if [ "${3}" = stage1 ]; then + make ${MAKEFLAGS} all-gcc; + elif [ "${3}" = native ]; then + make ${MAKEFLAGS} all-gcc; + make ${MAKEFLAGS} all-target-libgcc; + make ${MAKEFLAGS} all-target-libstdc++-v3; + make ${MAKEFLAGS} all; + fi; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + if [ "${3}" = stage1 ]; then + make ${MAKEFLAGS} install-gcc; + if match_uname_any CYGWIN\*; then + ln -s ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ + ln -s ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so; + fi; + elif [ "${3}" = native ]; then + make ${MAKEFLAGS} DESTDIR=${PREFIX_LVL} install; + fi; + set_build_script_done install finish; + fi; +fi; + +# vim:filetype=sh -- cgit v1.2.3