[Top][All Lists]

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

[Tinycc-devel] Problem With Configured Search Directories

From: Cayce Pollard
Subject: [Tinycc-devel] Problem With Configured Search Directories
Date: Tue, 3 Sep 2013 16:32:41 -0500

I believe I found the problem, but I don't know what the solution is.

Running tcc -print-search-dirs on my target device lists the wrong directories; the search directories added to the executable are from my build machine...which don't exist on my target device.

Further examination reveals that the directories are added from the --libpaths and --sysincludepaths options and not from the -Wl options referenced in the documentation for my standalone toolchain and specified by using the --extraldflags.

What is the right way to add lib and include paths to the binary?  Why is the path to the elf interpreter included in the binary?

On Mon, Sep 2, 2013 at 1:28 PM, Cayce Pollard <address@hidden> wrote:
Quick Update:
Copied libgnustl_shared.so to /usr/include and /include...still getting the same error.

Latest Configure Parameters:
sudo sh /project/tcc-0.9.26/configure --prefix=/usr --cross-prefix=/project/arm-cc/bin/arm-linux-androideabi- --sysroot=$SYSROOT --sysincludepaths=/project/arm-cc/sysroot/usr/include --libpaths=/project/arm-cc/sysroot/usr/lib:/project/arm-cc/arm-linux-androideabi/lib --extra-cflags='-march=armv7-a -mfloat-abi=softfp' --extra-ldflags='-Wl,-march=armv7-a -Wl,-fix-cortex-a8 -Wl,-rpath-link=/usr/bin:/usr/lib:/usr/share:/usr/lib/tcc/include -Wl,-lc -Wl,-landroid -Wl,-lsupc++ -Wl,-lstdc++ -Wl,-lgnustl_shared' --cpu=armv7-a --with-libgcc --crtprefix=/project/arm-cc/sysroot/usr/lib --elfinterp=/project/arm-cc/bin/arm-linux-androideabi-elfreadelf

Using the 4.7 version of the Android NDK standalone toolchain.

On Sun, Sep 1, 2013 at 3:16 PM, Cayce Pollard <address@hidden> wrote:
Now I need help.
After not being able to get 'make install' working after unpacking the tarball I'd created (this is all on my NookHD BTW), I copied the files in the extracted directory to the install locations (/usr/bin, /usr/lib, /usr/include).  I tried to make SCM again and still got the error:  scm.c:24: error: include file signal.h not found.

This may be an obvious question but I'm new to building/compiling:  If I link the header files in the error during tcc build, would that fix the problem?  If so, I thought that including the necessary paths for ./configure when building  tcc...by using the --sysroot=$SYSROOT (with the correct sysroot in the variable) or --libpaths or --sysincludepaths would take care of this.  If they don't...what do those configure options do?

On Thu, Aug 29, 2013 at 5:16 AM, Cayce Pollard <address@hidden> wrote:
I'm testing the tinycc binary I built for my Android device by attempting to build SCM (a lightweight Scheme interpreter) on it.

Running make scmlit (after running configure as per instructions) produces the following error:

scm.c:24: error: include file 'signal.h' not found.

Is this a limitation of the Android OS or did I make a mistake in building tinycc for Android?

Here's the configure options I used for the build:
sh /project/tcc-0.9.26/configure --prefix=/usr --enable-cross --cross-prefix=/project/arm-cc/bin/arm-linux-androideabi- --sysroot=$SYSROOT --sysincludepaths=/project/arm-cc/sysroot/usr/include --libpaths=/project/arm-cc/sysroot/usr/lib:/project/arm-cc/arm-linux-androideabi/lib --extra-cflags=-mfloat-abi=softfp --extra-ldflags='-Wl,-fix-cortex-a8 -Wl,-rpath-link=/project/arm-cc/sysroot/usr/lib -Wl,-lsupc++' --cpu=armv7-a --with-libgcc --crtprefix=/project/arm-cc/sysroot/usr/lib --elfinterp=/project/arm-cc/bin/arm-linux-androideabi-readelf --cc=/project/arm-cc/bin/arm-linux-androideabi-gcc-4.7

In config.h I made this change (in parens):
#define TCC_ARM_VERSION (7)

And in config.mak I made this change (again in parens):

reply via email to

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