From c51f9f7829b9f1911ee4aca7b8ae6ca2e5599e48 Mon Sep 17 00:00:00 2001 From: dwelch67 Date: Tue, 24 Sep 2013 15:20:26 -0400 Subject: [PATCH 1/2] I am not maintaining the build_gcc and build_clang in this repo, I have a separate repo now where I maintain those scripts --- buildgcc/README | 16 +++------------- buildgcc/build_clang | 9 --------- buildgcc/build_gcc | 39 --------------------------------------- 3 files changed, 3 insertions(+), 61 deletions(-) delete mode 100755 buildgcc/build_clang delete mode 100755 buildgcc/build_gcc diff --git a/buildgcc/README b/buildgcc/README index 42b50ee..1cdef70 100644 --- a/buildgcc/README +++ b/buildgcc/README @@ -1,17 +1,7 @@ -A script for building your own gnu toolchain for ARM. - -Derived directly from the same script at the mpx project at opencores.org - -Keep or change the PREFIX in the script to a path where you want the -binary to end up. - -sudo ./build_gcc - -then put whatever you had in your prefix/bin in the path. The default -gnuarm would mean /gnuarm/bin goes in the PATH. - -clang script I wrote, builds llvm+clang from sources. +*** I HAVE REMOVED THESE FILES *** +I have a separate build_gcc repository at github where I maintain the gcc +and clang build scripts I use for my own homebuilt toolchains. diff --git a/buildgcc/build_clang b/buildgcc/build_clang deleted file mode 100755 index 60c0580..0000000 --- a/buildgcc/build_clang +++ /dev/null @@ -1,9 +0,0 @@ - -svn co http://llvm.org/svn/llvm-project/llvm/branches/release_30/ llvm30 -cd llvm30 -cd tools -svn co http://llvm.org/svn/llvm-project/cfe/branches/release_30/ clang -cd .. -./configure --enable-optimized --disable-doxygen --prefix=/llvm30 -make -j 4 -make install diff --git a/buildgcc/build_gcc b/buildgcc/build_gcc deleted file mode 100755 index 75cef69..0000000 --- a/buildgcc/build_gcc +++ /dev/null @@ -1,39 +0,0 @@ - -# Usage -# sudo ./build_gcc - -# Setup vars -export TARGET=arm-none-eabi -export PREFIX=/gnuarm -export PATH=$PATH:$PREFIX/bin - -rm -rf build-* -rm -rf gcc-* -rm -rf binutils-* - -# Get archives -wget http://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.bz2 -wget http://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2 - -# Extract archives -bzip2 -dc binutils-2.22.tar.bz2 | tar -xf - -bzip2 -dc gcc-4.7.1.tar.bz2 | tar -xf - - -# Build binutils -mkdir build-binutils -cd build-binutils -../binutils-2.22/configure --target=$TARGET --prefix=$PREFIX -make all -make install - -# Build GCC -mkdir ../build-gcc -cd ../build-gcc -../gcc-4.7.1/configure --target=$TARGET --prefix=$PREFIX --without-headers --with-newlib --with-gnu-as --with-gnu-ld -make all-gcc -make install-gcc - -# Build libgcc.a -make all-target-libgcc CFLAGS_FOR_TARGET="-g -O2" -make install-target-libgcc - From 247b0091fc336c035c1217e45bd6055cacdb1518 Mon Sep 17 00:00:00 2001 From: dwelch67 Date: Mon, 28 Oct 2013 14:53:16 -0400 Subject: [PATCH 2/2] updating twain test data with gcc 4.8.x and clang/llvm 3.3 --- twain/Makefile | 5 ++-- twain/README | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/twain/Makefile b/twain/Makefile index a87588b..1b2b48b 100644 --- a/twain/Makefile +++ b/twain/Makefile @@ -8,7 +8,7 @@ COPS2 = -Wall -O3 -nostdlib -nostartfiles -ffreestanding COPS3 = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -mcpu=arm1176jzf-s COPS4 = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -mcpu=arm1176jzf-s -mtune=arm1176jzf-s COPS5 = -Wall -O3 -nostdlib -nostartfiles -ffreestanding -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -COPS = $(COPS5) +COPS = $(COPS4) gcc : twain.gcc.hex twain.gcc.bin @@ -88,7 +88,8 @@ ZBCSDEF = compress.bc deflate.bc trees.bc ZBCS = uncompr.bc inflate.bc crc32.bc adler32.bc inffast.bc inftrees.bc zutil.bc $(ZBCSDEF) -LOPS = -Wall -m32 -emit-llvm -ccc-host-triple $(ARMGNU) +#LOPS = -Wall -m32 -emit-llvm -ccc-host-triple $(ARMGNU) +LOPS = -Wall -m32 -emit-llvm -target $(ARMGNU) LLCOPS0 = -march=arm -mtriple=$(ARMGNU) LLCOPS1 = -march=arm -mtriple=$(ARMGNU) -mcpu=arm1176jzf-s LLCOPS = $(LLCOPS1) diff --git a/twain/README b/twain/README index d4236d1..ecf41df 100644 --- a/twain/README +++ b/twain/README @@ -153,6 +153,48 @@ COPS3 yes yes yes 0x17F0C8 COPS4 yes yes yes 0x17FB53 COPS5 yes yes yes 0x15B55E + +arm-none-eabi-gcc (GCC) 4.8.1 +Copyright (C) 2013 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +COPS0 no no no 0xD48A9F +COPS1 no no no 0xB994DC +COPS2 no no no memset +COPS3 no no no 0xC4CEBC +COPS4 no no no 0xC4D880 +COPS5 no no no memset + +COPS0 yes no no 0x9D6225 +COPS1 yes no no 0x90D014 +COPS2 yes no no memset +COPS3 yes no no 0x921680 +COPS4 yes no no 0x920FF1 +COPS5 yes no no memset + +COPS3 yes yes no 0x194A48 +COPS4 yes yes no 0x19379E +COPS5 yes yes no memset + +COPS3 yes yes yes 0x1948C2 +COPS4 yes yes yes 0x19409E +COPS5 yes yes yes memset + +memset means: + +twain.o: In function `xmemset': +twain.c:(.text+0x1dc): undefined reference to `memset' +twain.o: In function `xcalloc': +twain.c:(.text+0x23c): undefined reference to `memset' +trees.o: In function `build_tree': +trees.c:(.text+0x1028): undefined reference to `memset' +make: *** [twain.gcc.elf] Error 1 + +dont want to deal with that right now. + + + Some things to talk about at this point...First off I was using jtag to load and run these programs. Think about this for a second when you have the instruction cache on and the data cache off. If you stop @@ -318,6 +360,26 @@ LLCOPS1 yes no no 0xAB97C6 LLCOPS0 yes yes no 0x1A49FE LLCOPS1 yes yes no 0x19F911 + +clang version 3.3 (branches/release_33 189603) +Target: x86_64-unknown-linux-gnu +Thread model: posix + + +LLCOPS0 no no no 0xE6EF36 +LLCOPS1 no no no 0xF550AC + +LLCOPS0 yes no no 0xAC25D7 +LLCOPS1 yes no no 0xAC2B1C + +LLCOPS0 yes yes no 0x1CA6C5 +LLCOPS1 yes yes no 0x1C4F53 + +LLCOPS0 yes yes yes 0x1CA16C +LLCOPS1 yes yes yes 0x1C5B56 + + + A simple experiment to show the mmu overhead. Changing the code from this if(add_one(0x00000000,0x0000|8|4)) return(1);