From 6135d7a1d169f0684d8e8f6ec9f3cd04d0577476 Mon Sep 17 00:00:00 2001 From: Hector Oron Date: Tue, 11 Aug 2009 18:21:45 +0200 Subject: [PATCH 1/4] Add first bootstrap capabilities [Ron Lee] * Adds first stage bootstrap capabilities Signed-off-by: Hector Oron --- gcc-4.4/debian/rules.conf | 16 ++++++------ gcc-4.4/debian/rules.d/binary-libgcc-cross.mk | 9 +++++- gcc-4.4/debian/rules.defs | 20 ++++++++++++++- gcc-4.4/debian/rules2 | 32 +++++++++++++++--------- 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/gcc-4.4/debian/rules.conf b/gcc-4.4/debian/rules.conf index 4dd0b42..9b48f37 100644 --- a/gcc-4.4/debian/rules.conf +++ b/gcc-4.4/debian/rules.conf @@ -123,22 +123,22 @@ else endif # libc-dev dependencies -libc_ver := 2.5 +libc_ver ?= 2.5 ifeq ($(DEB_TARGET_ARCH_OS),linux) ifneq (,$(findstring $(DEB_TARGET_ARCH),alpha ia64)) - LIBC_DEP = libc6.1 + LIBC_DEP ?= libc6.1 else - LIBC_DEP = libc6 + LIBC_DEP ?= libc6 endif else ifeq ($(DEB_TARGET_ARCH_OS),hurd) - LIBC_DEP = libc0.3 + LIBC_DEP ?= libc0.3 endif ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd) - LIBC_DEP = libc0.1 + LIBC_DEP ?= libc0.1 endif endif -LIBC_DEV_DEP = $(LIBC_DEP)-dev +LIBC_DEV_DEP ?= $(LIBC_DEP)-dev # this is about Debian archs name, *NOT* GNU target triplet biarch_deb_map := \ @@ -496,8 +496,8 @@ endif control: control-file readme-bugs-file parameters-file copyright-file substvars-file versioned-files ifeq ($(DEB_CROSS),yes) - languages = c c++ objc objpp - addons = libgcc lib64gcc lib32gcc libcxx lib32cxx lib64cxx libn32cxx cdev c++dev libobjc objcdev objppdev gccxbase + languages ?= c c++ objc objpp + addons ?= libgcc lib64gcc lib32gcc libcxx lib32cxx lib64cxx libn32cxx cdev c++dev libobjc objcdev objppdev gccxbase else languages = ada c c++ fortran java objc objpp # pascal addons = gccbase cdev c++dev fdev libgcj libgcjdev gcjdoc libgnat libs \ diff --git a/gcc-4.4/debian/rules.d/binary-libgcc-cross.mk b/gcc-4.4/debian/rules.d/binary-libgcc-cross.mk index e3a4659..381b74c 100644 --- a/gcc-4.4/debian/rules.d/binary-libgcc-cross.mk +++ b/gcc-4.4/debian/rules.d/binary-libgcc-cross.mk @@ -52,8 +52,13 @@ ifeq ($(with_shared_libgcc),yes) cat debian/$(p_lgcc)/DEBIAN/shlibs >> debian/shlibs.local endif ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lgcc) - sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lgcc).substvars > debian/$(p_lgcc).substvars.new - mv debian/$(p_lgcc).substvars.new debian/$(p_lgcc).substvars + if [ -f debian/$(p_lgcc).substvars ]; then \ + sed 's/\(lib[^ ]*/\1$(cross_lib_arch) /g' \ + < debian/$(p_lgcc).substvars \ + > debian/$(p_lgcc).substvars.new; \ + mv debian/$(p_lgcc).substvars.new \ + debian/$(p_lgcc).substvars; \ + fi dh_gencontrol -p$(p_lgcc) \ -- -v$(DEB_LIBGCC_VERSION) $(common_substvars) b=libgcc; v=$(GCC_SONAME); \ diff --git a/gcc-4.4/debian/rules.defs b/gcc-4.4/debian/rules.defs index ab5d5b7..f8e5b27 100644 --- a/gcc-4.4/debian/rules.defs +++ b/gcc-4.4/debian/rules.defs @@ -693,6 +693,14 @@ ifeq ($(extra_package),yes) with_cxxdev := no endif else + + # dynamic libs ------------ + with_shared := yes + with_shared := $(call envfilt, shared, , , $(with_shared)) + + # threads ----------------- + with_threads ?= posix + # libssp ------------------ ifeq ($(with_ssp)-$(with_common_libs),yes-yes) ifneq ($(DEB_CROSS),yes) @@ -726,7 +734,7 @@ else # Shared libgcc -------------------- ifeq ($(with_common_libs),yes) with_libgcc := yes - with_shared_libgcc := yes + with_shared_libgcc := $(with_shared) endif # libgcc-math -------------------- @@ -1016,8 +1024,16 @@ ifeq ($(biarchn32),yes) $(shell CC="gcc -mabi=n32" bash debian/runcheck.sh))) endif +# multiarch +with_multiarch := yes +with_multiarch := $(call envfilt, multiarch, , , $(with_multiarch)) + +# linker-build-id +with_linker_build_id := yes +with_linker_build_id := $(call envfilt, multiarch, , , $(with_multiarch)) + # GNU locales -force_gnu_locales := yes +force_gnu_locales ?= yes locale_no_cpus := m68k locale_no_systems := knetbsd-gnu ifneq (,$(findstring $(DEB_TARGET_GNU_SYSTEM),$(locale_no_systems))) diff --git a/gcc-4.4/debian/rules2 b/gcc-4.4/debian/rules2 index 024b9a9..6ce78db 100644 --- a/gcc-4.4/debian/rules2 +++ b/gcc-4.4/debian/rules2 @@ -120,16 +120,19 @@ CONFARGS = -v \ CONFARGS += \ --enable-languages=$(subst $(SPACE),$(COMMA),$(enabled_languages)) \ --prefix=/$(PF) \ - --enable-shared \ - --enable-multiarch \ - --enable-linker-build-id \ --with-system-zlib \ +ifeq ($(with_shared),yes) + CONFARGS += --enabled-shared +else + CONFARGS += --disable-shared +endif + ifneq ($(PKGSOURCE),gcc-snapshot) CONFARGS += \ --libexecdir=/$(libexecdir) \ --without-included-gettext \ - --enable-threads=posix \ + --enable-threads=$(with_threads) \ --with-gxx-include-dir=/$(cxx_inc_dir) endif @@ -336,6 +339,14 @@ ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE))) endif endif +ifeq ($(with_multiarch),yes) + CONFARGS += --enable-multiarch +endif + +ifeq ($(with_linker_build_id),yes) + CONFARGS += --enable-linker-build-id +endif + ifeq ($(PKGSOURCE),gcc-snapshot) ifeq ($(findstring --disable-werror, $(CONFARGS)),) CONFARGS += --disable-werror @@ -344,19 +355,16 @@ else CONFARGS += --enable-checking=release endif -ifneq ($(DEB_CROSS),yes) - CONFARGS += \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --host=$(DEB_HOST_GNU_TYPE) \ - --target=$(TARGET_ALIAS) -else +ifeq ($(DEB_CROSS),yes) CONFARGS += \ --program-prefix=$(TARGET_ALIAS)- \ - --includedir=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include \ + --includedir=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include +endif + +CONFARGS += \ --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) \ --target=$(TARGET_ALIAS) -endif ifeq ($(with_bootstrap),) # no profiledbootstrap on the following architectures -- 1.6.3.3