Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
armv4l-unkown-linux-gcc compiler problem!!
- 01-28-2005
- Chan Ka Cheong
January 28, 2005, 7:27 am

Hi, I try to compile a bootloader "vivi" for my strongARM embedded
system. However, when i run "make"
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc
-I/root/cheong/gsl/linuette/vivi/include -I/opt/host/armv4l/include/
-Wall -Wstrict-prototypes -O2 -fPIC -fomit-frame-pointer -mapcs-32
-mshort-load-bytes -msoft-float -c -o init/main.o init/main.c
as: ????? `-mapcs-32'
make: *** [init/main.o] Error 1
So what is the problem from "-mapcs-32"? As I refer to arm-opion for my
gcc-2.95.2
http://web.umr.edu/~gnudoc/single/gcc-2.95.2/gcc.html#SEC22
It should supported this options!
My gcc compiler is "armv4l-unknown-linux-gcc" and my Makefile under the
vivi/arch/Makefile is like this:
--------------------------------------------------------------
# Select CPU dependent flags. Note that order of declaration is
important;
# the options further down the list override previous items.
#
# Note! For APCS-26 YOU MUST HAVE AN APCS-26 LIBGCC.A
#
apcs-y :=-mapcs-32
# This selects which instruction set is used.
arch-y :=
arch-$(CONFIG_CPU_32v4) :=-march=armv4
# This selects how we optimise for the processor.
tune-y :=
tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes
-msoft-float
AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
ifeq ($(CONFIG_CPU_32),y)
PROCESSOR = armv
TEXTADDR = 0x00000000
endif
LDSCRIPT = arch/vivi.lds.in
ifeq ($(CONFIG_ARCH_SA1100),y)
MACHINE = sa1100
TEXTADDR = 0x00000000
endif
ifeq ($(CONFIG_ARCH_S3C2400),y)
MACHINE = s3c2400
ifeq ($(CONFIG_S3C2400_GAMEPARK),y)
TEXTADDR = 0x00000000
ifeq ($(CONFIG_S3C2400_GAMEPARK_OSSWITCH),y)
TEXTADDR = 0x00100000
endif
ifeq ($(CONFIG_S3C2400_GAMEPARK_ON_RAM),y)
TEXTADDR = 0x0C000000
endif
else
TEXTADDR = 0x00000000
endif
endif
... ....
system. However, when i run "make"
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc
-I/root/cheong/gsl/linuette/vivi/include -I/opt/host/armv4l/include/
-Wall -Wstrict-prototypes -O2 -fPIC -fomit-frame-pointer -mapcs-32
-mshort-load-bytes -msoft-float -c -o init/main.o init/main.c
as: ????? `-mapcs-32'
make: *** [init/main.o] Error 1
So what is the problem from "-mapcs-32"? As I refer to arm-opion for my
gcc-2.95.2
http://web.umr.edu/~gnudoc/single/gcc-2.95.2/gcc.html#SEC22
It should supported this options!
My gcc compiler is "armv4l-unknown-linux-gcc" and my Makefile under the
vivi/arch/Makefile is like this:
--------------------------------------------------------------
# Select CPU dependent flags. Note that order of declaration is
important;
# the options further down the list override previous items.
#
# Note! For APCS-26 YOU MUST HAVE AN APCS-26 LIBGCC.A
#
apcs-y :=-mapcs-32
# This selects which instruction set is used.
arch-y :=
arch-$(CONFIG_CPU_32v4) :=-march=armv4
# This selects how we optimise for the processor.
tune-y :=
tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes
-msoft-float
AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
ifeq ($(CONFIG_CPU_32),y)
PROCESSOR = armv
TEXTADDR = 0x00000000
endif
LDSCRIPT = arch/vivi.lds.in
ifeq ($(CONFIG_ARCH_SA1100),y)
MACHINE = sa1100
TEXTADDR = 0x00000000
endif
ifeq ($(CONFIG_ARCH_S3C2400),y)
MACHINE = s3c2400
ifeq ($(CONFIG_S3C2400_GAMEPARK),y)
TEXTADDR = 0x00000000
ifeq ($(CONFIG_S3C2400_GAMEPARK_OSSWITCH),y)
TEXTADDR = 0x00100000
endif
ifeq ($(CONFIG_S3C2400_GAMEPARK_ON_RAM),y)
TEXTADDR = 0x0C000000
endif
else
TEXTADDR = 0x00000000
endif
endif
... ....
--
Regards,
Edward Chan
Regards,
Edward Chan

Re: armv4l-unkown-linux-gcc compiler problem!!
I use a similar processor for a project at work. I've not used the
option you're trying to use -mapcs-32. However, I didn't know it was
possible to select multiple optimizations for the instruction sets, for
example,
tune-y :=
> tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
> tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
The SA1110 is an ARM4 core. What does using the arm9tdmi tuning do for you?
Have you tried the default to see if you're able to build the project
without the -mapcs-32.?
Edwin Bland
Orange, CA
Chan Ka Cheong wrote:

vivi/arch/Makefile is like this:

Site Timeline
- » PCM output to DAC
- — Next thread in » Embedded Linux
-
- » flash device selection
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Caricatore rapido batterie, chiarimento.
- — The site's Newest Thread. Posted in » Electronics Hobby (Italian)
-