Support cross-compiling for uClibc targets #537

Closed
wants to merge 1 commit into from

4 participants

@msteinert

Disable backtrace support in src/config.h if uClibc is detected.

Tested on the following platforms:

  • sh4-linux-uclibc (GCC 4.1.1, uClibc 0.9.29)
  • mipsel-linux-uclibc (GCC 4.4.5, uClibc 0.9.29)

To cross-compile:

$ make CC=mipsel-linux-gcc MALLOC=libc

edit: updated commit message to include __UCLIBC_SUBLEVEL__ in version

@danielbprice

I'd like to see this commit make it into the tree, as well.

@msteinert

I tested change on OSX (native gcc & clang) and Linux (native gcc) and the test suite passed. Apparently __unix isn't defined on OSX.

$ gcc -E -dM main.c | grep -i unix
$ clang -E -dM main.c | grep -i unix
@danielbprice

FWiW, this doesn't apply cleanly against 2.6.10, although the changes are trivial.

@msteinert

@danielbprice, It's rebased against unstable again. I kind of forgot about this pull request. It's been open for 9 months and there doesn't appear to be any interest. Agreed, the changes are trivial!

@danielbprice

Thanks Mike. For what it's worth, I've used this patch as part of a proposed recipe for including redis in the buildroot distribution builder project. See http://lists.busybox.net/pipermail/buildroot/2013-March/068113.html

@danielbprice

Also, I can confirm testing on ARM, and i386, and x64 with gcc 4.6.3

@niko

+1 for this change

@danielbprice

This patch continues to be useful. Unfortunately it doesn't apply cleanly anymore on 2.6.14, although the rebase looks trivial.

@msteinert msteinert Support cross-compiling for uClibc targets
Disable backtrace support in src/config.h if uClibc is detected.

Tested on the following platforms:

- sh4-linux-uclibc (GCC 4.1.1, uClibc 0.9.29)
- mipsel-linux-uclibc (GCC 4.4.5, uClibc 0.9.29)

To cross-compile:

    $ make CC=mipsel-linux-gcc MALLOC=libc

Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
f496c59
@msteinert

Rebased!

@mattsta mattsta added a commit to mattsta/redis that referenced this pull request Aug 2, 2014
@msteinert msteinert Support cross-compiling for uClibc targets
Disable backtrace support in src/config.h if uClibc is detected.

Tested on the following platforms:

- sh4-linux-uclibc (GCC 4.1.1, uClibc 0.9.29)
- mipsel-linux-uclibc (GCC 4.4.5, uClibc 0.9.29)

To cross-compile:

    $ make CC=mipsel-linux-gcc MALLOC=libc

Signed-off-by: Michael Steinert <mike.steinert@gmail.com>

Closes #537
10a3a2a
@mattsta mattsta added a commit to mattsta/redis that referenced this pull request Aug 2, 2014
@msteinert msteinert Support cross-compiling for uClibc targets
Disable backtrace support in src/config.h if uClibc is detected.

Tested on the following platforms:

- sh4-linux-uclibc (GCC 4.1.1, uClibc 0.9.29)
- mipsel-linux-uclibc (GCC 4.4.5, uClibc 0.9.29)

To cross-compile:

    $ make CC=mipsel-linux-gcc MALLOC=libc

Signed-off-by: Michael Steinert <mike.steinert@gmail.com>

Closes #537
aaf2db3
@mattsta mattsta referenced this pull request Aug 2, 2014
Closed

ALL simple issue fixes #1906

@mattsta mattsta added a commit to mattsta/redis that referenced this pull request Aug 6, 2014
@msteinert msteinert Support cross-compiling for uClibc targets
Disable backtrace support in src/config.h if uClibc is detected.

Tested on the following platforms:

- sh4-linux-uclibc (GCC 4.1.1, uClibc 0.9.29)
- mipsel-linux-uclibc (GCC 4.4.5, uClibc 0.9.29)

To cross-compile:

    $ make CC=mipsel-linux-gcc MALLOC=libc

Signed-off-by: Michael Steinert <mike.steinert@gmail.com>

Closes #537
5a54182
@mattsta

Denied because "ifdef __unix that may not work everywhere. If the issue is with UCLIBC maybe we should include features.h in all cases but if __UCLIBC__ is defined."

@msteinert msteinert closed this Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment