ARM Cortex-M Microcontroller startup files

Jens Bauer via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 27 06:05:22 PDT 2015


On Monday, 27 April 2015 at 05:56:11 UTC, Iain Buclaw wrote:
> On 26 April 2015 at 22:41, Jens Bauer via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
>>
{snip}
>> The reason I cannot build GDC with multilib, is that I get a
>> compile-error when building the final GCC+GDC.

Correction: it's a 'build-error', but it's caused by sed.

>> Building GCC alone without GDC gives me no such error.
>
> Where exactly does it error?

Here's the complete chunk. It's on purpose I started with 
config.h.

---8<-----8<-----8<-----
config.status: creating config.h
config.status: executing default-1 commands
Adding multilib support to Makefile in 
/Users/jens/toolchain/Source/gcc/libstdc++-v3
with_multisubdir=thumb/cortex-m4/float-abi-hard/fpuv4-sp-d16
config.status: executing libtool commands
config.status: executing include/gstdint.h commands
config.status: executing generate-headers commands
echo timestamp > stamp-pb
echo timestamp > stamp-host
echo 0 > stamp-namespace-version
echo 1 > stamp-visibility
echo 1 > stamp-extern-template
sed -e '/^#pragma/b' \
	    -e 
'/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCXX_\1/g' 
\
	    -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
	    -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
	    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr.h > 
arm-none-eabi/bits/gthr.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
	    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' 
\
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr-single.h 
 > arm-none-eabi/bits/gthr-single.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
	    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' 
\
	    -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
	    -e 
's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr-posix.h 
 > arm-none-eabi/bits/gthr-posix.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
	    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' 
\
	    -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
	    -e 
's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
	    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr-single.h 
 > arm-none-eabi/bits/gthr-default.h
config.status: executing libtool commands
config.status: executing include/gstdint.h cconfig.status: 
executing include/gstdint.h commands
config.status: executing generate-headers commands
echo timestamp > stamp-pb
echo timestamp > stamp-host
echo 0 > stamp-namespace-version
echo 1 > stamp-visibility
echo 1 > stamp-extern-template
sed -e '/^#pragma/b' \
	    -e 
'/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCXX_\1/g' 
\
	    -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
	    -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
	    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr.h > 
arm-none-eabi/bits/gthr.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
	    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' 
\
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr-single.h 
 > arm-none-eabi/bits/gthr-single.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
	    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' 
\
	    -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
	    -e 
's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr-posix.h 
 > arm-none-eabi/bits/gthr-posix.h
sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
	    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' 
\
	    -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
	    -e 
's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
	    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
	    < 
/Users/jens/toolchain/Source/gcc/libstdc++-v3/../libgcc/gthr-single.h 
 > arm-none-eabi/bits/gthr-default.h
make: *** [all] Error 2
Failed
--->8----->8----->8-----

As you see, config.h, libstdc++ and multilib are all present in 
this chunk.


More information about the Digitalmars-d mailing list