tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] cross-compilation of tcc fails


From: Pip Cet
Subject: Re: [Tinycc-devel] cross-compilation of tcc fails
Date: Tue, 28 Apr 2015 02:56:42 +0000

Can you try "git revert 1cbb4d3" to see whether that fixes the
problem? Alternatively, you can try compiling with "make
XCC=arm-openwrt-linux-muslgnueabi-gcc".

In general it looks to me like the slew of commits starting on March 3
could do with some further review.

On Tue, Apr 28, 2015 at 12:21 AM, Emmanuel Deloget <address@hidden> wrote:
> Hello,
>
> I'm cross-compiling tcc to create a native ARM compiler for an ARM platform
> and noticed that this is just not possible with the current build scripts.
>
> $ ./configure --cpu=armv7a --cross-prefix=arm-openwrt-linux-muslgnueabi-
>
> The problem happens when the system tries to compile a native library:
>
>   make -C lib native
>   make[1]: Entering directory '/home/me/tcc-2015-04-28/lib'
>   mkdir -p arm
>   ../tcc -B.. -c libtcc1.c -o arm/libtcc1.o -I..  -fPIC -DTCC_TARGET_ARM
>   ../tcc: 1: ../tcc: Syntax error: word unexpected (expecting ")")
>
> (I spare you tons of lines ; I'm integrating tcc as an openwrt package as I
> don't want to build my own toolchain).
>
> Now, the error is perfectly logical, as tcc is:
>
>   $ file tcc
>   tcc: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically
> linked,
>   interpreter /lib/ld-musl-arm.so.1, not stripped
>
> it's not going to run.
>
> I'm more or less stick here: either I create cross-compilers and the library
> is built using the cross compilers (but that don't help much, as the
> cross-compiler will not run on my target host) or I build a cross-compiled
> native tcc but then I cannot compile the library.
>
> Unfortunately, I cannot build tcc for arm and rebuild it (with its native
> library) on the target host.
>
> So, question: what would be a good way to remove that deadly lock ?
>
> A) when cross-compiling, build the corresponding cross-compiler to build the
> library? That ould require to either have more configure switch or to detect
> the target arch from the cross-prefix (this is not always possible).
>
> B) use the cross-compiler to built the target library? it should not be
> difficult but I'm not sure that a good thing.
>
> C) something I haven't said yet?
>
> Best regards,
>
> -- Emmanuel Deloget
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]