diff options
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/gcc/Makefile | 20 | ||||
-rw-r--r-- | toolchain/uclibc-ng/Makefile | 14 |
2 files changed, 29 insertions, 5 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 40e9600a7..723b4ae5a 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -165,10 +165,6 @@ ifeq ($(ADK_TARGET_ARCH_METAG),y) GCC_CONFOPTS+= --with-cpu=2.1 --enable-meta-default --disable-symvers endif -ifeq ($(ADK_TARGET_CPU_CF),y) -GCC_CONFOPTS+= --with-arch=cf --disable-multilib -endif - ifeq ($(ADK_TARGET_ARCH_NDS32),y) GCC_CONFOPTS+= --with-arch=v3 endif @@ -177,6 +173,16 @@ ifeq ($(ADK_TARGET_ARCH_M68K)$(ADK_TARGET_ARCH_X86_64)$(ADK_TARGET_ARCH_X86),) GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib endif +ifeq ($(ADK_TARGET_CPU_CF),y) +GCC_CONFOPTS+= --with-arch=cf +GCC_INITIAL_CONFOPTS+= --enable-multilib +ifeq ($(ADK_TARGET_BINFMT_ELF)$(ADK_TARGET_WITH_MMU),y) +GCC_FINAL_CONFOPTS+= --disable-multilib --disable-threads --disable-libatomic +endif +else +GCC_INITIAL_CONFOPTS+= --disable-multilib +endif + ifeq ($(ADK_TARGET_ARCH_SH),y) ifeq ($(ADK_TARGET_LITTLE_ENDIAN),y) @@ -309,6 +315,10 @@ ifeq ($(ADK_TARGET_CPU_SH_SH4A),y) (cd ${STAGING_TARGET_DIR}/ && ln -sf . m4a) endif endif + # Need to get gcc to generate _all_ the multilib variants + # (so both MMU and non-mmu M68k and ColdFire). + $(SED) 's/M68K_MLIB_CPU +=/#M68K_MLIB_CPU +=/' $(WRKBUILD)/gcc/config/m68k/t-m68k + $(SED) 's/&& (FLAGS ~ "FL_MMU")//' $(WRKBUILD)/gcc/config/m68k/t-linux $(SED) '/k prot/agcc_cv_libc_provides_ssp=yes' $(WRKBUILD)/gcc/configure cd $(GCC_BUILD_DIR_INITIAL); \ PATH='$(TARGET_PATH)' \ @@ -317,13 +327,13 @@ endif CFLAGS="-O0 -g0 -fomit-frame-pointer" \ CXXFLAGS="-O0 -g0 -fomit-frame-pointer" \ $(WRKBUILD)/configure \ + ${GCC_INITIAL_CONFOPTS} \ ${GCC_CONFOPTS} \ ${GCC_TLS_CONFOPTS} \ --enable-languages=c \ --with-newlib \ --disable-shared \ --disable-threads \ - --disable-multilib \ --without-headers touch $@ diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile index 5b0a6fdef..6b1fd31ce 100644 --- a/toolchain/uclibc-ng/Makefile +++ b/toolchain/uclibc-ng/Makefile @@ -50,8 +50,13 @@ UCLIBC_MAKEOPTS+= -j${ADK_MAKE_JOBS} endif $(WRKBUILD)/.configured: $(WRKBUILD)/.prepared +ifeq ($(ADK_TARGET_WITH_MMU),y) PATH='$(HOST_PATH)' sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \ $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc-ng.config >${WRKBUILD}/.config +else + PATH='$(HOST_PATH)' sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \ + $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc-ng-nommu.config >${WRKBUILD}/.config +endif $(SED) 's^.*\(CROSS_COMPILER_PREFIX\).*^\1=\"$(TARGET_CROSS)\"^' ${WRKBUILD}/.config ifeq ($(ADK_TARGET_ENDIAN),little) $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config @@ -80,6 +85,13 @@ ifeq ($(ADK_TARGET_HARD_FLOAT_DP),y) $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config endif +ifeq ($(ADK_TARGET_BINFMT_ELF),y) + $(SED) 's/.*\(UCLIBC_FORMAT_ELF\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config +endif ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*\(UCLIBC_FORMAT_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config @@ -376,6 +388,8 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ VERBOSE=1 \ install_runtime install_dev + ln -f ${STAGING_TARGET_DIR}/usr/lib/crt1.o \ + ${STAGING_TARGET_DIR}/usr/lib/Scrt1.o ifeq ($(ADK_TARGET_LIBC_UTILS),y) PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \ ARCH="$(ADK_TARGET_ARCH)" \ |