[Buildroot] cross compile curl with buildroot
Michel Benoit
murpme at gmail.com
Tue Aug 12 08:42:07 UTC 2008
>> Does anyone have an idea what could be causing libcurl to throw an
>> Illegal instruction signal?
>> Has anyone successfully cross-compiled curl for an arm target?
>
> Saw the same problem. Turning -Os off seemed to get rid of it when
> compiling libcurl.
>
Thanks for the tip.
I solved the problem by adding CFLAGS=-O0 before .7configure in curl.mk.
$(CURL_DIR)/.configured: $(CURL_DIR)/.unpacked
(cd $(CURL_DIR); rm -rf config.cache; \
aclocal; \
libtoolize --force; \
./reconf; )
$(CONFIG_UPDATE) $(CURL_DIR)
(cd $(CURL_DIR); \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
CFLAGS=-O0 \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
The last -O on the gcc command line is the one that takes effect.
The -O0 thus overrides -Os from buildroot. With no external CFLAGS
defines curl configure uses -O2 by default.
Michel
More information about the buildroot
mailing list