diff for duplicates of <4FA00040.8000207@fnac.net> diff --git a/a/1.txt b/N1/1.txt index e61206d..a133938 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -74,3 +74,775 @@ diff -abBruN linux-3.2.14.orig/arch/arm/mm/nommu.c linux-3.2.14.mod/arch/arm/mm/ } -------------- next part -------------- +>From bd2014eb59dea812e396a5f299f53ed03629bdad Mon Sep 17 00:00:00 2001 +From: Paul Chavent <pchavent@wdcsd911h.onecert.fr> +Date: Fri, 27 Apr 2012 10:09:20 +0200 +Subject: [PATCH] Update arm support. + +--- + .gitignore | 1 + + Makefile.in | 2 +- + arm-elf2flt.ld | 221 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + elf2flt.c | 27 +++++++ + 4 files changed, 250 insertions(+), 1 deletions(-) + create mode 100644 arm-elf2flt.ld + +diff --git a/.gitignore b/.gitignore +index 92ff5f6..e0e0bd5 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -22,3 +22,4 @@ elf2flt + elf2flt.ld + flthdr + ld-elf2flt ++ld-elf2flt.sh +\ No newline at end of file +diff --git a/Makefile.in b/Makefile.in +index 81e1afc..f98421e 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -42,7 +42,7 @@ ifneq ($(strip $(shell gcc -v 2>&1 | grep "cygwin")),) + endif + + LDFILE= elf2flt.ld +-ifeq ($(strip $(CPU)),e1) ++ifeq ($(filter-out e1 arm,$(CPU)),) + SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld + else + SRC_LDFILE= elf2flt.ld +diff --git a/arm-elf2flt.ld b/arm-elf2flt.ld +new file mode 100644 +index 0000000..b57999c +--- /dev/null ++++ b/arm-elf2flt.ld +@@ -0,0 +1,221 @@ ++ ++ENTRY (_start) ++ ++MEMORY { ++ flatmem : ORIGIN = 0x0, LENGTH = 0x1000000 ++} ++ ++PHDRS { ++ text PT_LOAD ; ++ data PT_LOAD ; ++} ++ ++SECTIONS { ++ ++ .text 0x0 : { ++ . = ALIGN(0x4) ; ++ _stext = . ; ++ *(.text) ++ *(.text.*) ++ *(.gnu.warning) ++ *(.stub) ++ *(.gnu.linkonce.t*) ++ *(.glue_7t) ++ *(.glue_7) ++ *(.vfp11_veneer) ++ *(.jcr) ++ KEEP (*(.init)) ++ KEEP (*(.fini)) ++ ++W_RODAT *(.rodata) ++W_RODAT *(.rodata1) ++W_RODAT *(.rodata.*) ++W_RODAT *(.gnu.linkonce.r*) ++ ++ /* .ARM.extab name sections containing exception unwinding information */ ++ *(.ARM.extab* .gnu.linkonce.armextab.*) ++ /* This is special code area at the end of the normal ++ text section. It contains a small lookup table at ++ the start followed by the code pointed to by entries ++ in the lookup table. */ ++ . = ALIGN (4) ; ++ PROVIDE(__ctbp = .); ++ *(.call_table_data) ++ *(.call_table_text) ++ } > flatmem :text ++ ++ /* .ARM.exidx name sections containing index entries for section unwinding */ ++ /* .ARM.exidx is sorted, so has to go in its own output section. */ ++ __exidx_start = .; ++ .ARM.exidx : ++ { ++ *(.ARM.exidx* .gnu.linkonce.armexidx.*) ++ } > flatmem ++ __exidx_end = .; ++ ++ . = ALIGN(0x20) ; ++ _etext = . ; ++ ++ .data : { ++ . = ALIGN(0x4) ; ++ _sdata = . ; ++ __data_start = . ; ++ data_start = . ; ++ *(.got.plt) ++ *(.got) ++ FILL(0) ; ++ . = ALIGN(0x20) ; ++ LONG(-1) ++ . = ALIGN(0x20) ; ++R_RODAT *(.rodata) ++R_RODAT *(.rodata1) ++R_RODAT *(.rodata.*) ++R_RODAT *(.gnu.linkonce.r*) ++ *(.data) ++ *(.data1) ++ *(.data.*) ++ *(.gnu.linkonce.d*) ++ ++ /* Microblaze has .sdata and .sbss (small bss). They must ++ be contiguous, so please don't move any of this. JW */ ++ _ssrw = . ; ++ *(.sdata) ++ *(.sdata.*) ++ *(.sbss) /* Don't move this! */ ++ *(.gnu.linkonce.sb*) ++ _essrw = . ; ++ ++ _ssrw_size = _essrw - _ssrw; ++ PROVIDE(_SDA_BASE_ = _ssrw + (_ssrw_size / 2)); ++ ++ *(.gnu.linkonce.s.*) ++ *(__libc_atexit) ++ *(__libc_subinit) ++ *(__libc_subfreeres) ++ ++ /* microblaze-specific read-only small data area ++ and associated locating symbols */ ++ _ssro = . ; ++ *(.sdata2) ++ _essro = . ; ++ _ssro_size = _essro - _ssro; ++ PROVIDE(_SDA2_BASE_ = _ssro + (_ssro_size / 2)); ++ ++ . = ALIGN(4) ; ++TOR: __CTOR_LIST__ = .; ++TOR: LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) ++SINGLE_LINK: /* gcc uses crtbegin.o to find the start of ++SINGLE_LINK: the constructors, so we make sure it is ++SINGLE_LINK: first. Because this is a wildcard, it ++SINGLE_LINK: doesn't matter if the user does not ++SINGLE_LINK: actually link against crtbegin.o; the ++SINGLE_LINK: linker won't look for a file to match a ++SINGLE_LINK: wildcard. The wildcard also means that it ++SINGLE_LINK: doesn't matter which directory crtbegin.o ++SINGLE_LINK: is in. */ ++SINGLE_LINK: KEEP (*crtbegin*.o(.ctors)) ++SINGLE_LINK: /* We don't want to include the .ctor section from ++SINGLE_LINK: from the crtend.o file until after the sorted ctors. ++SINGLE_LINK: The .ctor section from the crtend file contains the ++SINGLE_LINK: end of ctors marker and it must be last */ ++SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) ++SINGLE_LINK: KEEP (*(SORT(.ctors.*))) ++ KEEP (*(.ctors)) ++TOR: LONG(0) ++TOR: __CTOR_END__ = .; ++TOR: __DTOR_LIST__ = .; ++TOR: LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) ++SINGLE_LINK: KEEP (*crtbegin*.o(.dtors)) ++SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) ++SINGLE_LINK: KEEP (*(SORT(.dtors.*))) ++ KEEP (*(.dtors)) ++TOR: LONG(0) ++TOR: __DTOR_END__ = .; ++ ++ PROVIDE (__preinit_array_start = .); ++ KEEP (*(.preinit_array)) ++ PROVIDE (__preinit_array_end = .); ++ ++ PROVIDE (__init_array_start = .); ++ KEEP (*(SORT(.init_array.*))) ++ KEEP (*(.init_array)) ++ PROVIDE (__init_array_end = .); ++ ++ PROVIDE (__fini_array_start = .); ++ KEEP (*(.fini_array)) ++ KEEP (*(SORT(.fini_array.*))) ++ PROVIDE (__fini_array_end = .); ++ } > flatmem :data ++ ++ .note.ABI-tag : { *(.note.ABI-tag) } > flatmem ++ .eh_frame_hdr : { *(.eh_frame_hdr) } > flatmem ++ .eh_frame : { KEEP(*(.eh_frame)) } > flatmem ++ .gcc_except_table : { ++ KEEP(*(.gcc_except_table)) ++ KEEP(*(.gcc_except_table.*)) ++ } >flatmem ++ ++ . = ALIGN(0x10) ; ++ _edata = . ; ++ ++ .bss : { ++ . = ALIGN(0x4) ; ++ _sbss = ALIGN(0x4) ; ++ __bss_start = . ; ++ *(.dynsbss) ++ *(.sbss) ++ *(.sbss.*) ++ *(.scommon) ++ *(.dynbss) ++ *(.bss) ++ *(.bss.*) ++ *(.bss*) ++ *(.gnu.linkonce.b*) ++ *(COMMON) ++ . = ALIGN(0x10) ; ++ _ebss = . ; ++ _end = . ; ++ end = . ; ++ } > flatmem ++ ++ .stack : { ++ . = ALIGN(0x4); ++ _stack_start = .; ++ } ++ ++ .junk 0 : { *(.rel*) *(.rela*) } ++ /DISCARD/ : { *(.note.GNU-stack) } ++ /* Stabs debugging sections. */ ++ .stab 0 : { *(.stab) } ++ .stabstr 0 : { *(.stabstr) } ++ .stab.excl 0 : { *(.stab.excl) } ++ .stab.exclstr 0 : { *(.stab.exclstr) } ++ .stab.index 0 : { *(.stab.index) } ++ .stab.indexstr 0 : { *(.stab.indexstr) } ++ .comment 0 : { *(.comment) } ++ /* DWARF debug sections. ++ Symbols in the DWARF debugging sections are relative to the beginning ++ of the section so we begin them at 0. */ ++ /* DWARF 1 */ ++ .debug 0 : { *(.debug) } ++ .line 0 : { *(.line) } ++ /* GNU DWARF 1 extensions */ ++ .debug_srcinfo 0 : { *(.debug_srcinfo) } ++ .debug_sfnames 0 : { *(.debug_sfnames) } ++ /* DWARF 1.1 and DWARF 2 */ ++ .debug_aranges 0 : { *(.debug_aranges) } ++ .debug_pubnames 0 : { *(.debug_pubnames) } ++ /* DWARF 2 */ ++ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } ++ .debug_abbrev 0 : { *(.debug_abbrev) } ++ .debug_line 0 : { *(.debug_line) } ++ .debug_frame 0 : { *(.debug_frame) } ++ .debug_str 0 : { *(.debug_str) } ++ .debug_loc 0 : { *(.debug_loc) } ++ .debug_macinfo 0 : { *(.debug_macinfo) } ++ /* SGI/MIPS DWARF 2 extensions */ ++ .debug_weaknames 0 : { *(.debug_weaknames) } ++ .debug_funcnames 0 : { *(.debug_funcnames) } ++ .debug_typenames 0 : { *(.debug_typenames) } ++ .debug_varnames 0 : { *(.debug_varnames) } ++} +diff --git a/elf2flt.c b/elf2flt.c +index 2fea9b5..1a7ef88 100644 +--- a/elf2flt.c ++++ b/elf2flt.c +@@ -54,6 +54,8 @@ const char *elf2flt_progname; + + #if defined(TARGET_h8300) + #include <elf/h8.h> /* TARGET_* ELF support for the BFD library */ ++#elif defined(TARGET_arm) ++#include "elf/arm.h" + #elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(TARGET_nios) || defined(TARGET_nios2) + #include "cygwin-elf.h" /* Cygwin uses a local copy */ + #elif defined(TARGET_microblaze) +@@ -639,12 +641,16 @@ dump_symbols(symbols, number_of_symbols); + relocation_needed = 1; + break; + case R_ARM_REL32: ++ case R_ARM_JUMP24: ++ case R_ARM_CALL: + case R_ARM_THM_PC11: + case R_ARM_THM_PC22: + case R_ARM_PC24: + case R_ARM_PLT32: + case R_ARM_GOTPC: + case R_ARM_GOT32: ++ case R_ARM_PREL31: ++ case R_ARM_NONE: + relocation_needed = 0; + break; + default: +@@ -1702,6 +1708,27 @@ int main(int argc, char *argv[]) + } + } + ++ if (verbose) { ++ printf(" verbose = %d\n" ++ " load_to_ram = %d\n" ++ " ktrace = %d\n" ++ " docompress = %d\n" ++ " pfile = \"%s\"\n" ++ " ofile = \"%s\"\n" ++ " use_resolved = %d\n" ++ " stack = %d\n" ++ " rel_file = \"%s\\n", ++ verbose , ++ load_to_ram , ++ ktrace , ++ docompress , ++ pfile , ++ ofile , ++ use_resolved, ++ stack , ++ rel_file ); ++ } ++ + /* + * if neither the -r or -p options was given, default to + * a RAM load as that is the only option that makes sense. +-- +1.6.4 + +-------------- next part -------------- +#!/bin/bash + +################################################################################ +# Setup framework # +################################################################################ + +source env_pkg.sh + +################################################################################ +# Set configuration variables # +################################################################################ + +GMP_NAME=gmp +GMP_VERSION=5.0.4 +GMP_EXTENSION=.tar.bz2 +GMP_LOCATIONS=http://ftp.gnu.org/gnu/gmp + +MPFR_NAME=mpfr +MPFR_VERSION=3.1.0 +MPFR_EXTENSION=.tar.bz2 +MPFR_LOCATIONS=http://www.mpfr.org/mpfr-current + +MPC_NAME=mpc +MPC_VERSION=0.9 +MPC_EXTENSION=.tar.gz +MPC_LOCATIONS=http://www.multiprecision.org/mpc/download + +BINUTILS_NAME=binutils +BINUTILS_VERSION=2.22 +BINUTILS_EXTENSION=.tar.bz2 +BINUTILS_LOCATIONS=http://ftp.gnu.org/gnu/binutils +BINUTILS_CONFIGURE_OPTIONS=${BINUTILS_CONFIGURE_OPTIONS:-""} + +ELF2FLT_NAME=elf2flt +ELF2FLT_VERSION=git +ELF2FLT_EXTENSION=.tar.bz2 +ELF2FLT_LOCATIONS=git://sources.blackfin.uclinux.org/git/users/vapier/elf2flt.git +ELF2FLT_PATCHES=${ELF2FLT_PATCHES:-"arm"} + +GCC_NAME=gcc +GCC_VERSION=${GCC_VERSION:-4.7.0} +GCC_EXTENSION=.tar.bz2 +GCC_LOCATIONS=http://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION} +GCC_STAGE_1_CONFIGURE_OPTIONS=${GCC_STAGE_1_CONFIGURE_OPTIONS:-""} +GCC_CONFIGURE_OPTIONS=${GCC_CONFIGURE_OPTIONS:-""} + +UCLIBC_NAME=uClibc +UCLIBC_VERSION=${UCLIBC_VERSION:-0.9.33.1} +UCLIBC_EXTENSION=.tar.xz +UCLIBC_LOCATIONS=http://www.uclibc.org/downloads +UCLIBC_CONFIG=${UCLIBC_CONFIG:-"def.config"} + +LINUX_NAME=linux +LINUX_VERSION=${LINUX_VERSION:-3.2.14} +LINUX_EXTENSION=.tar.bz2 +LINUX_LOCATIONS=http://www.kernel.org/pub/linux/kernel/v3.x +LINUX_PATCHES=${LINUX_PATCHES:-""} +LINUX_CONFIG=${LINUX_CONFIG:-"def.config"} + +LINUXRT_VERSION=${LINUXRT_VERSION:-""} +LINUXRT_EXTENSION=.patch.bz2 +LINUXRT_LOCATIONS=http://www.kernel.org//pub/linux/kernel/projects/rt/${LINUX_VERSION%.*}{,/older} + +################################################################################ +# binutils # +################################################################################ +toolchain_build_binutils() +{ + # download + pkg_source_get ${BINUTILS_NAME} ${BINUTILS_VERSION} ${BINUTILS_EXTENSION} ${BINUTILS_LOCATIONS} + + # extract + pkg_source_extract ${BINUTILS_NAME} ${BINUTILS_VERSION} ${BINUTILS_EXTENSION} + + # build + pkg_build_enter ${BINUTILS_NAME} ${BINUTILS_VERSION} + + CFLAGS="${CFLAGS} ${HOST_CFLAGS}" \ + ${PKG_SOURCES}/binutils-${BINUTILS_VERSION}/configure \ + --prefix=${PKG_TOOLCHAIN_PREFIX} \ + --with-sysroot=${PKG_TOOLCHAIN_SYSROOT} \ + --build=${BUILD} \ + --host=${HOST} \ + --target=${TARGET} \ + ${GCC_TARGET_CPU} \ + --disable-nls \ + --disable-multilib \ + --enable-shared \ + \ + ${BINUTILS_CONFIGURE_OPTIONS} \ + \ + -v + + $MAKE configure-host + + $MAKE + + $MAKE install + + pkg_build_leave ${BINUTILS_NAME} ${BINUTILS_VERSION} +} + +################################################################################ +# # +################################################################################ +toolchain_build_elf2flt() +{ + # download + pkg_source_get ${ELF2FLT_NAME} ${ELF2FLT_VERSION} ${ELF2FLT_EXTENSION} ${ELF2FLT_LOCATIONS} + + # extract + pkg_source_extract ${ELF2FLT_NAME} ${ELF2FLT_VERSION} ${ELF2FLT_EXTENSION} + + # patch + pkg_source_patch ${ELF2FLT_NAME} ${ELF2FLT_VERSION} ${ELF2FLT_PATCHES} + + # build for host + pkg_build_enter ${ELF2FLT_NAME} ${ELF2FLT_VERSION} + + local binutils_src_dir=${PKG_SOURCES}/binutils-${BINUTILS_VERSION} + local binutils_bld_dir=${PKG_BUILDS}/binutils-${BINUTILS_VERSION} + + CFLAGS="${CFLAGS} ${HOST_CFLAGS}" \ + ${PKG_SOURCES}/elf2flt-${ELF2FLT_VERSION}/configure \ + --prefix=${PKG_TOOLCHAIN_PREFIX} \ + --build=${BUILD} \ + --host=${HOST} \ + --target=${TARGET} \ + --with-binutils-include-dir=${binutils_src_dir}/include \ + --with-bfd-include-dir=${binutils_bld_dir}/bfd \ + --with-libbfd=${binutils_bld_dir}/bfd/libbfd.a \ + --with-libiberty=${binutils_bld_dir}/libiberty/libiberty.a + + $MAKE + + $MAKE install + + pkg_build_leave ${ELF2FLT_NAME} ${ELF2FLT_VERSION} +} + +################################################################################ +# gcc stage 1 (static without libc headers) # +################################################################################ +toolchain_build_gcc_stage_1() +{ + # download + pkg_source_get ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION} ${GMP_LOCATIONS} + pkg_source_get ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION} ${MPFR_LOCATIONS} + pkg_source_get ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION} ${MPC_LOCATIONS} + #pkg_source_get ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS} + pkg_source_get ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS} + + # extract + pkg_source_extract ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION} + pkg_source_extract ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION} + pkg_source_extract ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION} + #pkg_source_extract ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION} + pkg_source_extract ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION} + + # hack hack hack + if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp ] + then + ln -s ${PKG_SOURCES}/gmp-${GMP_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp + fi + if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr ] + then + ln -s ${PKG_SOURCES}/mpfr-${MPFR_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr + fi + if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc ] + then + ln -s ${PKG_SOURCES}/mpc-${MPC_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc + fi + + # build + pkg_build_enter ${GCC_NAME} ${GCC_VERSION} + + ASFLAGS="${ASFLAGS} ${HOST_ASFLAGS}" \ + CFLAGS="${CFLAGS} ${HOST_CFLAGS}" \ + ${PKG_SOURCES}/gcc-${GCC_VERSION}/configure \ + --prefix=${PKG_TOOLCHAIN_PREFIX} \ + --with-sysroot=${PKG_TOOLCHAIN_SYSROOT} \ + --build=${BUILD} \ + --host=${HOST} \ + --target=${TARGET} \ + ${GCC_TARGET_CPU} \ + ${GCC_TARGET_TUNE} \ + ${GCC_TARGET_ARCH} \ + ${GCC_TARGET_FLOAT} \ + ${GCC_TARGET_ABI} \ + \ + --without-ppl \ + --without-cloog \ + --with-mpfr-include=${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr/src \ + --with-mpfr-lib=${PKG_BUILDS}/gcc-${GCC_VERSION}/mpfr/src/.libs \ + --disable-nls \ + --enable-clocale=generic \ + --enable-languages=c \ + \ + --disable-multilib \ + --disable-decimal-float \ + --disable-libquadmath \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + \ + --disable-shared \ + --disable-threads \ + \ + --without-headers \ + --with-newlib \ + \ + ${GCC_STAGE_1_CONFIGURE_OPTIONS} \ + \ + -v + # --without-headers and --with-newlib make gcc believe that there + # is no c library available (yet) + + $MAKE all-gcc \ + ASFLAGS_FOR_TARGET="${ASFLAGS_FOR_TARGET} ${TARGET_ASFLAGS}" \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET} ${TARGET_CFLAGS}" + + $MAKE install-gcc + + $MAKE all-target-libgcc \ + ASFLAGS_FOR_TARGET="${ASFLAGS_FOR_TARGET} ${TARGET_ASFLAGS}" \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET} ${TARGET_CFLAGS}" + + $MAKE install-target-libgcc + + PKG_BUILD_LEAVE_CLEAN="yes_follow_links" \ + pkg_build_leave ${GCC_NAME} ${GCC_VERSION} +} + +################################################################################ +# kernel headers # +################################################################################ +toolchain_build_kernel_headers() +{ + # download + pkg_source_get ${LINUX_NAME} ${LINUX_VERSION} ${LINUX_EXTENSION} ${LINUX_LOCATIONS} + + # extract + pkg_source_extract ${LINUX_NAME} ${LINUX_VERSION} ${LINUX_EXTENSION} + + # patch + pkg_source_patch ${LINUX_NAME} ${LINUX_VERSION} "${LINUX_PATCHES}" + + # build + PKG_BUILD_ENTER_SRC_DIR="yes" \ + pkg_build_enter ${LINUX_NAME} ${LINUX_VERSION} + + # patch for rt + if [ -n "${LINUXRT_VERSION}" ] + then + pkg_source_get patch ${LINUX_VERSION}${LINUXRT_VERSION} ${LINUXRT_EXTENSION} ${LINUXRT_LOCATIONS} + cat=cat + if [ ${LINUXRT_EXTENSION} = ".patch.bz2" ] + then + cat=bunzip2 + elif [ ${LINUXRT_EXTENSION} = ".patch.gz" ] + then + cat=gunzip + fi + $cat < ${PKG_DOWNLOADS}/patch-${LINUX_VERSION}${LINUXRT_VERSION}${LINUXRT_EXTENSION} | patch --dry-run -p1 + if [ $? -eq 0 ] + then + $cat < ${PKG_DOWNLOADS}/patch-${LINUX_VERSION}${LINUXRT_VERSION}${LINUXRT_EXTENSION} | patch -p1 + fi + fi + + # build headers + $MAKE headers_check \ + ARCH=${LINUX_TARGET_ARCH} \ + CROSS_COMPILE=${TARGET}- + + $MAKE headers_install \ + ARCH=${LINUX_TARGET_ARCH} \ + CROSS_COMPILE=${TARGET}- \ + INSTALL_HDR_PATH=${PKG_TOOLCHAIN_SYSROOT}/usr + + #PKG_BUILD_LEAVE_CLEAN="yes" \ + pkg_build_leave ${LINUX_NAME} ${LINUX_VERSION} +} + +################################################################################ +# libc # +################################################################################ +toolchain_build_libc() +{ + # download + pkg_source_get ${UCLIBC_NAME} ${UCLIBC_VERSION} ${UCLIBC_EXTENSION} ${UCLIBC_LOCATIONS} + + # extract + pkg_source_extract ${UCLIBC_NAME} ${UCLIBC_VERSION} ${UCLIBC_EXTENSION} + + # build + PKG_BUILD_ENTER_SRC_DIR="yes" \ + pkg_build_enter ${UCLIBC_NAME} ${UCLIBC_VERSION} + + # configure + if [ -f ${FWK_SYSTEM_PACKAGES}/uClibc/${UCLIBC_CONFIG} ] + then + cp ${FWK_SYSTEM_PACKAGES}/uClibc/${UCLIBC_CONFIG} ./.config + $MAKE ARCH=${LINUX_TARGET_ARCH} CROSS_COMPILE=${TARGET}- oldconfig + else + echo "${FWK_SYSTEM_PACKAGES}/uClibc/${UCLIBC_CONFIG} not found" + exit 1 + fi + + # uclibc don't take the good kernel header + # and fail with, e.g., '__ARM_NR_set_tls' undeclared + # we need to give the kernel path, see + # http://www.linuxfromscratch.org/clfs/view/clfs-3.0/mips/cross-tools/uclibc.html + # buildroot-yyyy.mm/toolchain/uClibc/uclibc.mk + # http://www.avrfreaks.net/wiki/index.php/Documentation:AVR32_Linux_Toolchain_HowTo#Building_the_C_library + # + # SHARED_LIB_LOADER_PREFIX has been replaced by MULTILIB_DIR in uclibc >= 0.9.33 + # + sed -i.bak \ + -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${TARGET}-\":" \ + -e "/^TARGET_ARCH/s:=.*:=\"${LINUX_TARGET_ARCH}\":" \ + -e "/^KERNEL_HEADERS/s:=.*:=\"${PKG_TOOLCHAIN_SYSROOT}/usr/include\":" \ + -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ + -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ + -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/lib${LIBDIRSUFFIX}\":" \ + -e "/^MULTILIB_DIR/s:=.*:=\"/lib${LIBDIRSUFFIX}\":" \ + -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${TARGET_CFLAGS} -O2\":" \ + .config + + $MAKE all utils \ + install install_utils \ + ARCH=${LINUX_TARGET_ARCH} \ + CROSS_COMPILE=${TARGET}- \ + PREFIX=${PKG_TOOLCHAIN_SYSROOT} + + # install host stuff + $MAKE hostutils \ + install_hostutils \ + ARCH=${LINUX_TARGET_ARCH} \ + CROSS_COMPILE=${TARGET}- \ + PREFIX=${PKG_TOOLCHAIN_PREFIX} + + # ${PREFIX}${DEVEL_PREFIX}bin/ldd + if [ -f ${PKG_TOOLCHAIN_PREFIX}/usr/bin/ldd ] + then + ln -sf ../usr/bin/ldd ${PKG_TOOLCHAIN_PREFIX}/bin/${TARGET}-ldd + fi + # ${PREFIX}${RUNTIME_PREFIX}sbin/ldconfig + if [ -f ${PKG_TOOLCHAIN_PREFIX}/sbin/ldconfig ] + then + ln -sf ../sbin/ldconfig ${PKG_TOOLCHAIN_PREFIX}/bin/${TARGET}-ldconfig + fi + + pkg_build_leave ${UCLIBC_NAME} ${UCLIBC_VERSION} +} + +################################################################################ +# gcc # +################################################################################ +toolchain_build_gcc() +{ + # download + pkg_source_get ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION} ${GMP_LOCATIONS} + pkg_source_get ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION} ${MPFR_LOCATIONS} + pkg_source_get ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION} ${MPC_LOCATIONS} + #pkg_source_get ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS} + #pkg_source_get ${GCC_NAME}-g++ ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS} + pkg_source_get ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS} + + # extract + pkg_source_extract ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION} + pkg_source_extract ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION} + pkg_source_extract ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION} + #pkg_source_extract ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION} + #pkg_source_extract ${GCC_NAME}-g++ ${GCC_VERSION} ${GCC_EXTENSION} + pkg_source_extract ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION} + + # hack hack hack + if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp ] + then + ln -s ${PKG_SOURCES}/gmp-${GMP_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp + fi + if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr ] + then + ln -s ${PKG_SOURCES}/mpfr-${MPFR_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr + fi + if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc ] + then + ln -s ${PKG_SOURCES}/mpc-${MPC_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc + fi + + # build + pkg_build_enter ${GCC_NAME} ${GCC_VERSION} + + ASFLAGS="${ASFLAGS} ${HOST_ASFLAGS}" \ + CFLAGS="${CFLAGS} ${HOST_CFLAGS}" \ + ${PKG_SOURCES}/gcc-${GCC_VERSION}/configure \ + --prefix=${PKG_TOOLCHAIN_PREFIX} \ + --with-sysroot=${PKG_TOOLCHAIN_SYSROOT} \ + --build=${BUILD} \ + --host=${HOST} \ + --target=${TARGET} \ + ${GCC_TARGET_CPU} \ + ${GCC_TARGET_TUNE} \ + ${GCC_TARGET_ARCH} \ + ${GCC_TARGET_FLOAT} \ + ${GCC_TARGET_ABI} \ + \ + --without-ppl \ + --without-cloog \ + --with-mpfr-include=${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr/src \ + --with-mpfr-lib=${PKG_BUILDS}/gcc-${GCC_VERSION}/mpfr/src/.libs \ + --disable-nls \ + --enable-clocale=generic \ + --enable-languages=c,c++ \ + \ + --enable-shared \ + --enable-threads=posix \ + --enable-tls \ + --disable-__cxa_atexit \ + \ + ${GCC_CONFIGURE_OPTIONS} \ + \ + -v + # now with shared libs and threads + # now with c++ + # the cxa_atexit is special for eglibc + + $MAKE \ + ASFLAGS_FOR_TARGET="${ASFLAGS_FOR_TARGET} ${TARGET_ASFLAGS}" \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET} ${TARGET_CFLAGS}" + + $MAKE install + + pkg_build_leave ${GCC_NAME} ${GCC_VERSION} +} + +################################################################################ +# # +################################################################################ + +toolchain_build_binutils +toolchain_build_elf2flt +toolchain_build_gcc_stage_1 +toolchain_build_kernel_headers +toolchain_build_libc +toolchain_build_gcc diff --git a/a/content_digest b/N1/content_digest index 8a18837..a0fe677 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ - "From\0Paul Chavent <paul.chavent@fnac.net>\0" - "Subject\0[Buildroot] Running linux with mmu disabled on arm (AT91).\0" + "From\0paul.chavent@fnac.net (Paul Chavent)\0" + "Subject\0Running linux with mmu disabled on arm (AT91).\0" "Date\0Tue, 01 May 2012 17:24:48 +0200\0" - "To\0buildroot@busybox.net\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Hi.\n" @@ -79,6 +79,778 @@ " \tbootmem_init();\n" " }\n" " \n" - -------------- next part -------------- + "-------------- next part --------------\n" + ">From bd2014eb59dea812e396a5f299f53ed03629bdad Mon Sep 17 00:00:00 2001\n" + "From: Paul Chavent <pchavent@wdcsd911h.onecert.fr>\n" + "Date: Fri, 27 Apr 2012 10:09:20 +0200\n" + "Subject: [PATCH] Update arm support.\n" + "\n" + "---\n" + " .gitignore | 1 +\n" + " Makefile.in | 2 +-\n" + " arm-elf2flt.ld | 221 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n" + " elf2flt.c | 27 +++++++\n" + " 4 files changed, 250 insertions(+), 1 deletions(-)\n" + " create mode 100644 arm-elf2flt.ld\n" + "\n" + "diff --git a/.gitignore b/.gitignore\n" + "index 92ff5f6..e0e0bd5 100644\n" + "--- a/.gitignore\n" + "+++ b/.gitignore\n" + "@@ -22,3 +22,4 @@ elf2flt\n" + " elf2flt.ld\n" + " flthdr\n" + " ld-elf2flt\n" + "+ld-elf2flt.sh\n" + "\\ No newline at end of file\n" + "diff --git a/Makefile.in b/Makefile.in\n" + "index 81e1afc..f98421e 100644\n" + "--- a/Makefile.in\n" + "+++ b/Makefile.in\n" + "@@ -42,7 +42,7 @@ ifneq ($(strip $(shell gcc -v 2>&1 | grep \"cygwin\")),)\n" + " endif\n" + " \n" + " LDFILE= elf2flt.ld\n" + "-ifeq ($(strip $(CPU)),e1)\n" + "+ifeq ($(filter-out e1 arm,$(CPU)),)\n" + " SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld\n" + " else \n" + " SRC_LDFILE= elf2flt.ld\n" + "diff --git a/arm-elf2flt.ld b/arm-elf2flt.ld\n" + "new file mode 100644\n" + "index 0000000..b57999c\n" + "--- /dev/null\n" + "+++ b/arm-elf2flt.ld\n" + "@@ -0,0 +1,221 @@\n" + "+\n" + "+ENTRY (_start)\n" + "+\n" + "+MEMORY {\n" + "+\tflatmem : ORIGIN = 0x0, LENGTH = 0x1000000\n" + "+}\n" + "+\n" + "+PHDRS {\n" + "+\ttext PT_LOAD ;\n" + "+\tdata PT_LOAD ;\n" + "+}\n" + "+\n" + "+SECTIONS {\n" + "+\n" + "+\t.text 0x0 : {\n" + "+\t\t. = ALIGN(0x4) ;\n" + "+\t\t_stext = . ;\n" + "+\t\t*(.text)\n" + "+\t\t*(.text.*)\n" + "+\t\t*(.gnu.warning)\n" + "+\t\t*(.stub)\n" + "+\t\t*(.gnu.linkonce.t*)\n" + "+\t\t*(.glue_7t)\n" + "+\t\t*(.glue_7)\n" + "+\t\t*(.vfp11_veneer)\n" + "+\t\t*(.jcr)\n" + "+\t\tKEEP (*(.init))\n" + "+\t\tKEEP (*(.fini))\n" + "+\n" + "+W_RODAT\t\t*(.rodata)\n" + "+W_RODAT\t\t*(.rodata1)\n" + "+W_RODAT\t\t*(.rodata.*)\n" + "+W_RODAT\t\t*(.gnu.linkonce.r*)\n" + "+\n" + "+ /* .ARM.extab name sections containing exception unwinding information */\n" + "+\t\t*(.ARM.extab* .gnu.linkonce.armextab.*)\n" + "+\t\t/* This is special code area at the end of the normal\n" + "+\t\t text section. It contains a small lookup table at\n" + "+\t\t the start followed by the code pointed to by entries\n" + "+\t\t in the lookup table. */\n" + "+\t\t. = ALIGN (4) ;\n" + "+\t\tPROVIDE(__ctbp = .);\n" + "+\t\t*(.call_table_data)\n" + "+\t\t*(.call_table_text)\n" + "+\t} > flatmem :text\n" + "+\n" + "+ /* .ARM.exidx name sections containing index entries for section unwinding */\n" + "+\t/* .ARM.exidx is sorted, so has to go in its own output section. */\n" + "+\t __exidx_start = .;\n" + "+\t.ARM.exidx :\n" + "+\t{\n" + "+\t\t*(.ARM.exidx* .gnu.linkonce.armexidx.*)\n" + "+\t} > flatmem\n" + "+\t__exidx_end = .;\n" + "+\n" + "+\t. = ALIGN(0x20) ;\n" + "+\t_etext = . ;\n" + "+\n" + "+\t.data : {\n" + "+ . = ALIGN(0x4) ;\n" + "+\t\t_sdata = . ;\n" + "+\t\t__data_start = . ;\n" + "+\t\tdata_start = . ;\n" + "+\t\t*(.got.plt)\n" + "+\t\t*(.got)\n" + "+\t\tFILL(0) ;\n" + "+\t\t. = ALIGN(0x20) ;\n" + "+\t\tLONG(-1)\n" + "+\t\t. = ALIGN(0x20) ;\n" + "+R_RODAT\t\t*(.rodata)\n" + "+R_RODAT\t\t*(.rodata1)\n" + "+R_RODAT\t\t*(.rodata.*)\n" + "+R_RODAT\t\t*(.gnu.linkonce.r*)\n" + "+\t\t*(.data)\n" + "+\t\t*(.data1)\n" + "+\t\t*(.data.*)\n" + "+\t\t*(.gnu.linkonce.d*)\n" + "+\n" + "+\t\t/* Microblaze has .sdata and .sbss (small bss). They must\n" + "+\t\t be contiguous, so please don't move any of this. JW */\n" + "+\t\t_ssrw = . ;\n" + "+\t\t*(.sdata)\n" + "+\t\t*(.sdata.*)\n" + "+\t\t*(.sbss)\t\t\t/* Don't move this! */\n" + "+\t\t*(.gnu.linkonce.sb*)\n" + "+\t\t_essrw = . ;\n" + "+\n" + "+\t\t_ssrw_size = _essrw - _ssrw;\n" + "+\t\tPROVIDE(_SDA_BASE_ = _ssrw + (_ssrw_size / 2));\n" + "+\n" + "+\t\t*(.gnu.linkonce.s.*)\n" + "+\t\t*(__libc_atexit)\n" + "+\t\t*(__libc_subinit)\n" + "+\t\t*(__libc_subfreeres)\n" + "+\n" + "+\t\t/* microblaze-specific read-only small data area\n" + "+\t\t and associated locating symbols */\n" + "+\t\t_ssro = . ;\n" + "+\t\t*(.sdata2)\n" + "+\t\t_essro = . ;\n" + "+\t\t_ssro_size = _essro - _ssro;\n" + "+\t\tPROVIDE(_SDA2_BASE_ = _ssro + (_ssro_size / 2));\n" + "+\n" + "+\t\t. = ALIGN(4) ;\n" + "+TOR:\t\t__CTOR_LIST__ = .;\n" + "+TOR:\t\tLONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)\n" + "+SINGLE_LINK:\t/* gcc uses crtbegin.o to find the start of\n" + "+SINGLE_LINK:\t the constructors, so we make sure it is\n" + "+SINGLE_LINK:\t first. Because this is a wildcard, it\n" + "+SINGLE_LINK:\t doesn't matter if the user does not\n" + "+SINGLE_LINK:\t actually link against crtbegin.o; the\n" + "+SINGLE_LINK:\t linker won't look for a file to match a\n" + "+SINGLE_LINK:\t wildcard. The wildcard also means that it\n" + "+SINGLE_LINK:\t doesn't matter which directory crtbegin.o\n" + "+SINGLE_LINK:\t is in. */\n" + "+SINGLE_LINK:\tKEEP (*crtbegin*.o(.ctors))\n" + "+SINGLE_LINK:\t/* We don't want to include the .ctor section from\n" + "+SINGLE_LINK:\t from the crtend.o file until after the sorted ctors.\n" + "+SINGLE_LINK:\t The .ctor section from the crtend file contains the\n" + "+SINGLE_LINK:\t end of ctors marker and it must be last */\n" + "+SINGLE_LINK:\tKEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))\n" + "+SINGLE_LINK:\tKEEP (*(SORT(.ctors.*)))\n" + "+\t\tKEEP (*(.ctors))\n" + "+TOR:\t\tLONG(0)\n" + "+TOR:\t\t__CTOR_END__ = .;\n" + "+TOR:\t\t__DTOR_LIST__ = .;\n" + "+TOR:\t\tLONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)\n" + "+SINGLE_LINK:\tKEEP (*crtbegin*.o(.dtors))\n" + "+SINGLE_LINK:\tKEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))\n" + "+SINGLE_LINK:\tKEEP (*(SORT(.dtors.*)))\n" + "+\t\tKEEP (*(.dtors))\n" + "+TOR:\t\tLONG(0)\n" + "+TOR:\t\t__DTOR_END__ = .;\n" + "+\n" + "+\t\tPROVIDE (__preinit_array_start = .);\n" + "+\t\tKEEP (*(.preinit_array))\n" + "+\t\tPROVIDE (__preinit_array_end = .);\n" + "+\n" + "+\t\tPROVIDE (__init_array_start = .);\n" + "+\t\tKEEP (*(SORT(.init_array.*)))\n" + "+\t\tKEEP (*(.init_array))\n" + "+\t\tPROVIDE (__init_array_end = .);\n" + "+\n" + "+\t\tPROVIDE (__fini_array_start = .);\n" + "+\t\tKEEP (*(.fini_array))\n" + "+\t\tKEEP (*(SORT(.fini_array.*)))\n" + "+\t\tPROVIDE (__fini_array_end = .);\n" + "+\t} > flatmem :data\n" + "+\n" + "+\t.note.ABI-tag : { *(.note.ABI-tag) } > flatmem\n" + "+\t.eh_frame_hdr : { *(.eh_frame_hdr) } > flatmem\n" + "+\t.eh_frame : { KEEP(*(.eh_frame)) } > flatmem\n" + "+\t.gcc_except_table : {\n" + "+\t\tKEEP(*(.gcc_except_table))\n" + "+\t\tKEEP(*(.gcc_except_table.*))\n" + "+\t} >flatmem\n" + "+\n" + "+\t. = ALIGN(0x10) ;\n" + "+\t_edata = . ;\n" + "+\n" + "+\t.bss : {\n" + "+\t\t. = ALIGN(0x4) ;\n" + "+\t\t_sbss = ALIGN(0x4) ;\n" + "+\t\t__bss_start = . ;\n" + "+\t\t*(.dynsbss)\n" + "+\t\t*(.sbss)\n" + "+\t\t*(.sbss.*)\n" + "+\t\t*(.scommon)\n" + "+\t\t*(.dynbss)\n" + "+\t\t*(.bss)\n" + "+\t\t*(.bss.*)\n" + "+\t\t*(.bss*)\n" + "+\t\t*(.gnu.linkonce.b*)\n" + "+\t\t*(COMMON)\n" + "+\t\t. = ALIGN(0x10) ;\n" + "+\t\t_ebss = . ;\n" + "+\t\t_end = . ;\n" + "+\t\tend = . ;\n" + "+\t} > flatmem\n" + "+\n" + "+\t.stack : {\n" + "+\t\t. = ALIGN(0x4);\n" + "+\t\t_stack_start = .;\n" + "+\t}\n" + "+\n" + "+\t.junk 0 : { *(.rel*) *(.rela*) }\n" + "+\t/DISCARD/ : { *(.note.GNU-stack) }\n" + "+\t/* Stabs debugging sections. */\n" + "+\t.stab 0 : { *(.stab) }\n" + "+\t.stabstr 0 : { *(.stabstr) }\n" + "+\t.stab.excl 0 : { *(.stab.excl) }\n" + "+\t.stab.exclstr 0 : { *(.stab.exclstr) }\n" + "+\t.stab.index 0 : { *(.stab.index) }\n" + "+\t.stab.indexstr 0 : { *(.stab.indexstr) }\n" + "+\t.comment 0 : { *(.comment) }\n" + "+\t/* DWARF debug sections.\n" + "+\t Symbols in the DWARF debugging sections are relative to the beginning\n" + "+\t of the section so we begin them at 0. */\n" + "+\t/* DWARF 1 */\n" + "+\t.debug 0 : { *(.debug) }\n" + "+\t.line 0 : { *(.line) }\n" + "+\t/* GNU DWARF 1 extensions */\n" + "+\t.debug_srcinfo 0 : { *(.debug_srcinfo) }\n" + "+\t.debug_sfnames 0 : { *(.debug_sfnames) }\n" + "+\t/* DWARF 1.1 and DWARF 2 */\n" + "+\t.debug_aranges 0 : { *(.debug_aranges) }\n" + "+\t.debug_pubnames 0 : { *(.debug_pubnames) }\n" + "+\t/* DWARF 2 */\n" + "+\t.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }\n" + "+\t.debug_abbrev 0 : { *(.debug_abbrev) }\n" + "+\t.debug_line 0 : { *(.debug_line) }\n" + "+\t.debug_frame 0 : { *(.debug_frame) }\n" + "+\t.debug_str 0 : { *(.debug_str) }\n" + "+\t.debug_loc 0 : { *(.debug_loc) }\n" + "+\t.debug_macinfo 0 : { *(.debug_macinfo) }\n" + "+\t/* SGI/MIPS DWARF 2 extensions */\n" + "+\t.debug_weaknames 0 : { *(.debug_weaknames) }\n" + "+\t.debug_funcnames 0 : { *(.debug_funcnames) }\n" + "+\t.debug_typenames 0 : { *(.debug_typenames) }\n" + "+\t.debug_varnames 0 : { *(.debug_varnames) }\n" + "+}\n" + "diff --git a/elf2flt.c b/elf2flt.c\n" + "index 2fea9b5..1a7ef88 100644\n" + "--- a/elf2flt.c\n" + "+++ b/elf2flt.c\n" + "@@ -54,6 +54,8 @@ const char *elf2flt_progname;\n" + " \n" + " #if defined(TARGET_h8300)\n" + " #include <elf/h8.h> /* TARGET_* ELF support for the BFD library */\n" + "+#elif defined(TARGET_arm)\n" + "+#include \"elf/arm.h\"\n" + " #elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(TARGET_nios) || defined(TARGET_nios2)\n" + " #include \"cygwin-elf.h\"\t/* Cygwin uses a local copy */\n" + " #elif defined(TARGET_microblaze)\n" + "@@ -639,12 +641,16 @@ dump_symbols(symbols, number_of_symbols);\n" + " \t\t\t\t\trelocation_needed = 1;\n" + " \t\t\t\t\tbreak;\n" + " \t\t\t\tcase R_ARM_REL32:\n" + "+\t\t\t\tcase R_ARM_JUMP24:\n" + "+\t\t\t\tcase R_ARM_CALL:\n" + " \t\t\t\tcase R_ARM_THM_PC11:\n" + " \t\t\t\tcase R_ARM_THM_PC22:\n" + " \t\t\t\tcase R_ARM_PC24:\n" + " \t\t\t\tcase R_ARM_PLT32:\n" + " \t\t\t\tcase R_ARM_GOTPC:\n" + " \t\t\t\tcase R_ARM_GOT32:\n" + "+\t\t\t\tcase R_ARM_PREL31:\n" + "+\t\t\t\tcase R_ARM_NONE:\n" + " \t\t\t\t\trelocation_needed = 0;\n" + " \t\t\t\t\tbreak;\n" + " \t\t\t\tdefault:\n" + "@@ -1702,6 +1708,27 @@ int main(int argc, char *argv[])\n" + " }\n" + " }\n" + " \n" + "+ if (verbose) {\n" + "+ printf(\" verbose = %d\\n\"\n" + "+ \" load_to_ram = %d\\n\"\n" + "+ \" ktrace = %d\\n\"\n" + "+ \" docompress = %d\\n\"\n" + "+ \" pfile = \\\"%s\\\"\\n\"\n" + "+ \" ofile = \\\"%s\\\"\\n\"\n" + "+ \" use_resolved = %d\\n\"\n" + "+ \" stack = %d\\n\"\n" + "+ \" rel_file = \\\"%s\\\\n\",\n" + "+ verbose ,\n" + "+ load_to_ram ,\n" + "+ ktrace ,\n" + "+ docompress ,\n" + "+ pfile ,\n" + "+ ofile ,\n" + "+ use_resolved,\n" + "+ stack ,\n" + "+ rel_file );\n" + "+ }\n" + "+\n" + " /*\n" + " * if neither the -r or -p options was given, default to\n" + " * a RAM load as that is the only option that makes sense.\n" + "-- \n" + "1.6.4\n" + "\n" + "-------------- next part --------------\n" + "#!/bin/bash\n" + "\n" + "################################################################################\n" + "# Setup framework #\n" + "################################################################################\n" + "\n" + "source env_pkg.sh\n" + "\n" + "################################################################################\n" + "# Set configuration variables #\n" + "################################################################################\n" + "\n" + "GMP_NAME=gmp\n" + "GMP_VERSION=5.0.4\n" + "GMP_EXTENSION=.tar.bz2\n" + "GMP_LOCATIONS=http://ftp.gnu.org/gnu/gmp\n" + "\n" + "MPFR_NAME=mpfr\n" + "MPFR_VERSION=3.1.0\n" + "MPFR_EXTENSION=.tar.bz2\n" + "MPFR_LOCATIONS=http://www.mpfr.org/mpfr-current\n" + "\n" + "MPC_NAME=mpc\n" + "MPC_VERSION=0.9\n" + "MPC_EXTENSION=.tar.gz\n" + "MPC_LOCATIONS=http://www.multiprecision.org/mpc/download\n" + "\n" + "BINUTILS_NAME=binutils\n" + "BINUTILS_VERSION=2.22\n" + "BINUTILS_EXTENSION=.tar.bz2\n" + "BINUTILS_LOCATIONS=http://ftp.gnu.org/gnu/binutils\n" + "BINUTILS_CONFIGURE_OPTIONS=${BINUTILS_CONFIGURE_OPTIONS:-\"\"}\n" + "\n" + "ELF2FLT_NAME=elf2flt\n" + "ELF2FLT_VERSION=git\n" + "ELF2FLT_EXTENSION=.tar.bz2\n" + "ELF2FLT_LOCATIONS=git://sources.blackfin.uclinux.org/git/users/vapier/elf2flt.git\n" + "ELF2FLT_PATCHES=${ELF2FLT_PATCHES:-\"arm\"}\n" + "\n" + "GCC_NAME=gcc\n" + "GCC_VERSION=${GCC_VERSION:-4.7.0}\n" + "GCC_EXTENSION=.tar.bz2\n" + "GCC_LOCATIONS=http://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}\n" + "GCC_STAGE_1_CONFIGURE_OPTIONS=${GCC_STAGE_1_CONFIGURE_OPTIONS:-\"\"}\n" + "GCC_CONFIGURE_OPTIONS=${GCC_CONFIGURE_OPTIONS:-\"\"}\n" + "\n" + "UCLIBC_NAME=uClibc\n" + "UCLIBC_VERSION=${UCLIBC_VERSION:-0.9.33.1}\n" + "UCLIBC_EXTENSION=.tar.xz\n" + "UCLIBC_LOCATIONS=http://www.uclibc.org/downloads\n" + "UCLIBC_CONFIG=${UCLIBC_CONFIG:-\"def.config\"}\n" + "\n" + "LINUX_NAME=linux\n" + "LINUX_VERSION=${LINUX_VERSION:-3.2.14}\n" + "LINUX_EXTENSION=.tar.bz2\n" + "LINUX_LOCATIONS=http://www.kernel.org/pub/linux/kernel/v3.x\n" + "LINUX_PATCHES=${LINUX_PATCHES:-\"\"}\n" + "LINUX_CONFIG=${LINUX_CONFIG:-\"def.config\"}\n" + "\n" + "LINUXRT_VERSION=${LINUXRT_VERSION:-\"\"}\n" + "LINUXRT_EXTENSION=.patch.bz2\n" + "LINUXRT_LOCATIONS=http://www.kernel.org//pub/linux/kernel/projects/rt/${LINUX_VERSION%.*}{,/older}\n" + "\n" + "################################################################################\n" + "# binutils #\n" + "################################################################################\n" + "toolchain_build_binutils()\n" + "{\n" + " # download\n" + " pkg_source_get ${BINUTILS_NAME} ${BINUTILS_VERSION} ${BINUTILS_EXTENSION} ${BINUTILS_LOCATIONS}\n" + "\n" + " # extract\n" + " pkg_source_extract ${BINUTILS_NAME} ${BINUTILS_VERSION} ${BINUTILS_EXTENSION}\n" + "\n" + " # build\n" + " pkg_build_enter ${BINUTILS_NAME} ${BINUTILS_VERSION}\n" + "\n" + " CFLAGS=\"${CFLAGS} ${HOST_CFLAGS}\" \\\n" + " ${PKG_SOURCES}/binutils-${BINUTILS_VERSION}/configure \\\n" + "\t--prefix=${PKG_TOOLCHAIN_PREFIX} \\\n" + "\t--with-sysroot=${PKG_TOOLCHAIN_SYSROOT} \\\n" + "\t--build=${BUILD} \\\n" + "\t--host=${HOST} \\\n" + "\t--target=${TARGET} \\\n" + " ${GCC_TARGET_CPU} \\\n" + "\t--disable-nls \\\n" + "\t--disable-multilib \\\n" + "\t--enable-shared \\\n" + " \\\n" + "\t${BINUTILS_CONFIGURE_OPTIONS} \\\n" + "\t\\\n" + "\t-v\n" + "\n" + " $MAKE configure-host\n" + "\n" + " $MAKE\n" + "\n" + " $MAKE install\n" + "\n" + " pkg_build_leave ${BINUTILS_NAME} ${BINUTILS_VERSION}\n" + "}\n" + "\n" + "################################################################################\n" + "# #\n" + "################################################################################\n" + "toolchain_build_elf2flt()\n" + "{\n" + " # download\n" + " pkg_source_get ${ELF2FLT_NAME} ${ELF2FLT_VERSION} ${ELF2FLT_EXTENSION} ${ELF2FLT_LOCATIONS}\n" + "\n" + " # extract\n" + " pkg_source_extract ${ELF2FLT_NAME} ${ELF2FLT_VERSION} ${ELF2FLT_EXTENSION}\n" + "\n" + " # patch\n" + " pkg_source_patch ${ELF2FLT_NAME} ${ELF2FLT_VERSION} ${ELF2FLT_PATCHES}\n" + "\n" + " # build for host\n" + " pkg_build_enter ${ELF2FLT_NAME} ${ELF2FLT_VERSION}\n" + "\n" + " local binutils_src_dir=${PKG_SOURCES}/binutils-${BINUTILS_VERSION}\n" + " local binutils_bld_dir=${PKG_BUILDS}/binutils-${BINUTILS_VERSION}\n" + "\n" + " CFLAGS=\"${CFLAGS} ${HOST_CFLAGS}\" \\\n" + " ${PKG_SOURCES}/elf2flt-${ELF2FLT_VERSION}/configure \\\n" + "\t--prefix=${PKG_TOOLCHAIN_PREFIX} \\\n" + "\t--build=${BUILD} \\\n" + "\t--host=${HOST} \\\n" + "\t--target=${TARGET} \\\n" + " --with-binutils-include-dir=${binutils_src_dir}/include \\\n" + " --with-bfd-include-dir=${binutils_bld_dir}/bfd \\\n" + " --with-libbfd=${binutils_bld_dir}/bfd/libbfd.a \\\n" + " --with-libiberty=${binutils_bld_dir}/libiberty/libiberty.a\n" + "\n" + " $MAKE\n" + "\n" + " $MAKE install\n" + "\n" + " pkg_build_leave ${ELF2FLT_NAME} ${ELF2FLT_VERSION}\n" + "}\n" + "\n" + "################################################################################\n" + "# gcc stage 1 (static without libc headers) #\n" + "################################################################################\n" + "toolchain_build_gcc_stage_1()\n" + "{\n" + " # download\n" + " pkg_source_get ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION} ${GMP_LOCATIONS}\n" + " pkg_source_get ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION} ${MPFR_LOCATIONS}\n" + " pkg_source_get ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION} ${MPC_LOCATIONS}\n" + " #pkg_source_get ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS}\n" + " pkg_source_get ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS}\n" + "\n" + " # extract\n" + " pkg_source_extract ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION}\n" + " pkg_source_extract ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION}\n" + " pkg_source_extract ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION}\n" + " #pkg_source_extract ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION}\n" + " pkg_source_extract ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION}\n" + "\n" + " # hack hack hack\n" + " if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp ]\n" + " then\n" + "\tln -s ${PKG_SOURCES}/gmp-${GMP_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp\n" + " fi\n" + " if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr ]\n" + " then\n" + "\tln -s ${PKG_SOURCES}/mpfr-${MPFR_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr\n" + " fi\n" + " if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc ]\n" + " then\n" + "\tln -s ${PKG_SOURCES}/mpc-${MPC_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc\n" + " fi\n" + "\n" + " # build\n" + " pkg_build_enter ${GCC_NAME} ${GCC_VERSION}\n" + "\n" + " ASFLAGS=\"${ASFLAGS} ${HOST_ASFLAGS}\" \\\n" + " CFLAGS=\"${CFLAGS} ${HOST_CFLAGS}\" \\\n" + " ${PKG_SOURCES}/gcc-${GCC_VERSION}/configure \\\n" + " --prefix=${PKG_TOOLCHAIN_PREFIX} \\\n" + " --with-sysroot=${PKG_TOOLCHAIN_SYSROOT} \\\n" + "\t--build=${BUILD} \\\n" + "\t--host=${HOST} \\\n" + " --target=${TARGET} \\\n" + " ${GCC_TARGET_CPU} \\\n" + "\t${GCC_TARGET_TUNE} \\\n" + "\t${GCC_TARGET_ARCH} \\\n" + "\t${GCC_TARGET_FLOAT} \\\n" + " ${GCC_TARGET_ABI} \\\n" + " \\\n" + " --without-ppl \\\n" + " --without-cloog \\\n" + " --with-mpfr-include=${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr/src \\\n" + " --with-mpfr-lib=${PKG_BUILDS}/gcc-${GCC_VERSION}/mpfr/src/.libs \\\n" + "\t--disable-nls \\\n" + " --enable-clocale=generic \\\n" + " --enable-languages=c \\\n" + " \\\n" + "\t--disable-multilib \\\n" + "\t--disable-decimal-float \\\n" + "\t--disable-libquadmath \\\n" + "\t--disable-libmudflap \\\n" + "\t--disable-libssp \\\n" + "\t--disable-libgomp \\\n" + "\t\\\n" + "\t--disable-shared \\\n" + "\t--disable-threads \\\n" + "\t\\\n" + " --without-headers \\\n" + "\t--with-newlib \\\n" + " \\\n" + "\t${GCC_STAGE_1_CONFIGURE_OPTIONS} \\\n" + "\t\\\n" + "\t-v\n" + " # --without-headers and --with-newlib make gcc believe that there\n" + " # is no c library available (yet)\n" + "\n" + " $MAKE all-gcc \\\n" + "\tASFLAGS_FOR_TARGET=\"${ASFLAGS_FOR_TARGET} ${TARGET_ASFLAGS}\" \\\n" + "\tCFLAGS_FOR_TARGET=\"${CFLAGS_FOR_TARGET} ${TARGET_CFLAGS}\"\n" + " \n" + " $MAKE install-gcc\n" + "\n" + " $MAKE all-target-libgcc \\\n" + "\tASFLAGS_FOR_TARGET=\"${ASFLAGS_FOR_TARGET} ${TARGET_ASFLAGS}\" \\\n" + "\tCFLAGS_FOR_TARGET=\"${CFLAGS_FOR_TARGET} ${TARGET_CFLAGS}\"\n" + " \n" + " $MAKE install-target-libgcc\n" + "\n" + " PKG_BUILD_LEAVE_CLEAN=\"yes_follow_links\" \\\n" + " pkg_build_leave ${GCC_NAME} ${GCC_VERSION}\n" + "}\n" + "\n" + "################################################################################\n" + "# kernel headers #\n" + "################################################################################\n" + "toolchain_build_kernel_headers()\n" + "{\n" + " # download\n" + " pkg_source_get ${LINUX_NAME} ${LINUX_VERSION} ${LINUX_EXTENSION} ${LINUX_LOCATIONS}\n" + "\n" + " # extract\n" + " pkg_source_extract ${LINUX_NAME} ${LINUX_VERSION} ${LINUX_EXTENSION}\n" + "\n" + " # patch\n" + " pkg_source_patch ${LINUX_NAME} ${LINUX_VERSION} \"${LINUX_PATCHES}\"\n" + "\n" + " # build\n" + " PKG_BUILD_ENTER_SRC_DIR=\"yes\" \\\n" + " pkg_build_enter ${LINUX_NAME} ${LINUX_VERSION}\n" + "\n" + " # patch for rt\n" + " if [ -n \"${LINUXRT_VERSION}\" ]\n" + " then\n" + " pkg_source_get patch ${LINUX_VERSION}${LINUXRT_VERSION} ${LINUXRT_EXTENSION} ${LINUXRT_LOCATIONS}\n" + " cat=cat\n" + " if [ ${LINUXRT_EXTENSION} = \".patch.bz2\" ]\n" + " then\n" + " cat=bunzip2\n" + " elif [ ${LINUXRT_EXTENSION} = \".patch.gz\" ]\n" + " then\n" + " cat=gunzip\n" + " fi\n" + " $cat < ${PKG_DOWNLOADS}/patch-${LINUX_VERSION}${LINUXRT_VERSION}${LINUXRT_EXTENSION} | patch --dry-run -p1\n" + " \tif [ $? -eq 0 ]\n" + " then\n" + " $cat < ${PKG_DOWNLOADS}/patch-${LINUX_VERSION}${LINUXRT_VERSION}${LINUXRT_EXTENSION} | patch -p1\n" + " fi\n" + " fi\n" + "\n" + " # build headers\n" + " $MAKE headers_check \\\n" + "\tARCH=${LINUX_TARGET_ARCH} \\\n" + "\tCROSS_COMPILE=${TARGET}- \n" + "\n" + " $MAKE headers_install \\\n" + "\tARCH=${LINUX_TARGET_ARCH} \\\n" + "\tCROSS_COMPILE=${TARGET}- \\\n" + "\tINSTALL_HDR_PATH=${PKG_TOOLCHAIN_SYSROOT}/usr \n" + "\n" + " #PKG_BUILD_LEAVE_CLEAN=\"yes\" \\\n" + " pkg_build_leave ${LINUX_NAME} ${LINUX_VERSION}\n" + "}\n" + "\n" + "################################################################################\n" + "# libc #\n" + "################################################################################\n" + "toolchain_build_libc()\n" + "{\n" + " # download\n" + " pkg_source_get ${UCLIBC_NAME} ${UCLIBC_VERSION} ${UCLIBC_EXTENSION} ${UCLIBC_LOCATIONS}\n" + "\n" + " # extract\n" + " pkg_source_extract ${UCLIBC_NAME} ${UCLIBC_VERSION} ${UCLIBC_EXTENSION}\n" + "\n" + " # build\n" + " PKG_BUILD_ENTER_SRC_DIR=\"yes\" \\\n" + " pkg_build_enter ${UCLIBC_NAME} ${UCLIBC_VERSION}\n" + "\n" + " # configure\n" + " if [ -f ${FWK_SYSTEM_PACKAGES}/uClibc/${UCLIBC_CONFIG} ]\n" + " then\n" + "\tcp ${FWK_SYSTEM_PACKAGES}/uClibc/${UCLIBC_CONFIG} ./.config\n" + "\t$MAKE ARCH=${LINUX_TARGET_ARCH} CROSS_COMPILE=${TARGET}- oldconfig\n" + " else\n" + " echo \"${FWK_SYSTEM_PACKAGES}/uClibc/${UCLIBC_CONFIG} not found\"\n" + " exit 1\n" + " fi\n" + "\n" + " # uclibc don't take the good kernel header \n" + " # and fail with, e.g., '__ARM_NR_set_tls' undeclared\n" + " # we need to give the kernel path, see\n" + " # http://www.linuxfromscratch.org/clfs/view/clfs-3.0/mips/cross-tools/uclibc.html\n" + " # buildroot-yyyy.mm/toolchain/uClibc/uclibc.mk\n" + " # http://www.avrfreaks.net/wiki/index.php/Documentation:AVR32_Linux_Toolchain_HowTo#Building_the_C_library\n" + " #\n" + " # SHARED_LIB_LOADER_PREFIX has been replaced by MULTILIB_DIR in uclibc >= 0.9.33\n" + " #\n" + " sed -i.bak \\\n" + " -e \"/^CROSS_COMPILER_PREFIX/s:=.*:=\\\"${TARGET}-\\\":\" \\\n" + " -e \"/^TARGET_ARCH/s:=.*:=\\\"${LINUX_TARGET_ARCH}\\\":\" \\\n" + "\t-e \"/^KERNEL_HEADERS/s:=.*:=\\\"${PKG_TOOLCHAIN_SYSROOT}/usr/include\\\":\" \\\n" + " -e \"/^DEVEL_PREFIX/s:=.*:=\\\"/usr\\\":\" \\\n" + " -e \"/^RUNTIME_PREFIX/s:=.*:=\\\"/\\\":\" \\\n" + " -e \"/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\\\"/lib${LIBDIRSUFFIX}\\\":\" \\\n" + " -e \"/^MULTILIB_DIR/s:=.*:=\\\"/lib${LIBDIRSUFFIX}\\\":\" \\\n" + " -e \"/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\\\"${TARGET_CFLAGS} -O2\\\":\" \\\n" + " .config\n" + " \n" + " $MAKE all utils \\\n" + " install install_utils \\\n" + " ARCH=${LINUX_TARGET_ARCH} \\\n" + "\tCROSS_COMPILE=${TARGET}- \\\n" + " PREFIX=${PKG_TOOLCHAIN_SYSROOT}\n" + "\n" + " # install host stuff \n" + " $MAKE hostutils \\\n" + " install_hostutils \\\n" + " ARCH=${LINUX_TARGET_ARCH} \\\n" + "\tCROSS_COMPILE=${TARGET}- \\\n" + " PREFIX=${PKG_TOOLCHAIN_PREFIX}\n" + "\n" + " # ${PREFIX}${DEVEL_PREFIX}bin/ldd\n" + " if [ -f ${PKG_TOOLCHAIN_PREFIX}/usr/bin/ldd ]\n" + " then\n" + "\tln -sf ../usr/bin/ldd ${PKG_TOOLCHAIN_PREFIX}/bin/${TARGET}-ldd\n" + " fi\n" + " # ${PREFIX}${RUNTIME_PREFIX}sbin/ldconfig\n" + " if [ -f ${PKG_TOOLCHAIN_PREFIX}/sbin/ldconfig ]\n" + " then\n" + "\tln -sf ../sbin/ldconfig ${PKG_TOOLCHAIN_PREFIX}/bin/${TARGET}-ldconfig\n" + " fi\n" + "\n" + " pkg_build_leave ${UCLIBC_NAME} ${UCLIBC_VERSION}\n" + "}\n" + "\n" + "################################################################################\n" + "# gcc #\n" + "################################################################################\n" + "toolchain_build_gcc()\n" + "{\n" + " # download\n" + " pkg_source_get ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION} ${GMP_LOCATIONS}\n" + " pkg_source_get ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION} ${MPFR_LOCATIONS}\n" + " pkg_source_get ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION} ${MPC_LOCATIONS}\n" + " #pkg_source_get ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS}\n" + " #pkg_source_get ${GCC_NAME}-g++ ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS}\n" + " pkg_source_get ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION} ${GCC_LOCATIONS}\n" + "\n" + " # extract\n" + " pkg_source_extract ${GMP_NAME} ${GMP_VERSION} ${GMP_EXTENSION}\n" + " pkg_source_extract ${MPFR_NAME} ${MPFR_VERSION} ${MPFR_EXTENSION}\n" + " pkg_source_extract ${MPC_NAME} ${MPC_VERSION} ${MPC_EXTENSION}\n" + " #pkg_source_extract ${GCC_NAME}-core ${GCC_VERSION} ${GCC_EXTENSION}\n" + " #pkg_source_extract ${GCC_NAME}-g++ ${GCC_VERSION} ${GCC_EXTENSION}\n" + " pkg_source_extract ${GCC_NAME} ${GCC_VERSION} ${GCC_EXTENSION}\n" + "\n" + " # hack hack hack\n" + " if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp ]\n" + " then\n" + "\tln -s ${PKG_SOURCES}/gmp-${GMP_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/gmp\n" + " fi\n" + " if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr ]\n" + " then\n" + "\tln -s ${PKG_SOURCES}/mpfr-${MPFR_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr\n" + " fi\n" + " if [ ! -L ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc ]\n" + " then\n" + "\tln -s ${PKG_SOURCES}/mpc-${MPC_VERSION} ${PKG_SOURCES}/gcc-${GCC_VERSION}/mpc\n" + " fi\n" + "\n" + " # build\n" + " pkg_build_enter ${GCC_NAME} ${GCC_VERSION}\n" + "\n" + " ASFLAGS=\"${ASFLAGS} ${HOST_ASFLAGS}\" \\\n" + " CFLAGS=\"${CFLAGS} ${HOST_CFLAGS}\" \\\n" + " ${PKG_SOURCES}/gcc-${GCC_VERSION}/configure \\\n" + " --prefix=${PKG_TOOLCHAIN_PREFIX} \\\n" + " --with-sysroot=${PKG_TOOLCHAIN_SYSROOT} \\\n" + "\t--build=${BUILD} \\\n" + "\t--host=${HOST} \\\n" + " --target=${TARGET} \\\n" + " ${GCC_TARGET_CPU} \\\n" + "\t${GCC_TARGET_TUNE} \\\n" + "\t${GCC_TARGET_ARCH} \\\n" + "\t${GCC_TARGET_FLOAT} \\\n" + " ${GCC_TARGET_ABI} \\\n" + " \\\n" + " --without-ppl \\\n" + " --without-cloog \\\n" + " --with-mpfr-include=${PKG_SOURCES}/gcc-${GCC_VERSION}/mpfr/src \\\n" + " --with-mpfr-lib=${PKG_BUILDS}/gcc-${GCC_VERSION}/mpfr/src/.libs \\\n" + " --disable-nls \\\n" + "\t--enable-clocale=generic \\\n" + " --enable-languages=c,c++ \\\n" + " \\\n" + " --enable-shared \\\n" + " --enable-threads=posix \\\n" + "\t--enable-tls \\\n" + "\t--disable-__cxa_atexit \\\n" + "\t\\\n" + "\t${GCC_CONFIGURE_OPTIONS} \\\n" + " \\\n" + "\t-v\n" + " # now with shared libs and threads\n" + " # now with c++\n" + " # the cxa_atexit is special for eglibc\n" + "\n" + " $MAKE \\\n" + "\tASFLAGS_FOR_TARGET=\"${ASFLAGS_FOR_TARGET} ${TARGET_ASFLAGS}\" \\\n" + "\tCFLAGS_FOR_TARGET=\"${CFLAGS_FOR_TARGET} ${TARGET_CFLAGS}\"\n" + "\n" + " $MAKE install\n" + "\n" + " pkg_build_leave ${GCC_NAME} ${GCC_VERSION}\n" + "}\n" + "\n" + "################################################################################\n" + "# #\n" + "################################################################################\n" + "\n" + "toolchain_build_binutils\n" + "toolchain_build_elf2flt\n" + "toolchain_build_gcc_stage_1\n" + "toolchain_build_kernel_headers\n" + "toolchain_build_libc\n" + toolchain_build_gcc -c64f77144516895042f6e1c04290c6b9bc33daaa464a121ec8a66d07207f4f7d +d71ba4f67ad6c5c27f9294fd1c97143117db40f6102f1f15dbecdbeca10f0f04
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.