Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -fnested-functions to tests_CFLAGS #32

Merged

Conversation

EddieRingle
Copy link
Contributor

On some versions of GCC (e.g., Xcode's GCC on OS X), the -fnested-functions
flag needs to be passed as nested functions are disabled by default.

This fixes test compilation errors on OS X when using GCC 4.2.1.

Signed-off-by: Eddie Ringle eddie@eringle.net

On some versions of GCC (e.g., Xcode's GCC on OS X), the -fnested-functions
flag needs to be passed as nested functions are disabled by default.

This fixes test compilation errors on OS X when using GCC 4.2.1.

Signed-off-by: Eddie Ringle <eddie@eringle.net>
orangeduck added a commit that referenced this pull request May 18, 2013
…-tests

Add -fnested-functions to tests_CFLAGS
@orangeduck orangeduck merged commit 3902341 into orangeduck:master May 18, 2013
@EddieRingle EddieRingle deleted the add-nested-functions-cflag-to-tests branch May 18, 2013 15:58
@johnpmayer
Copy link

This breaks the install on my machine (64-bit Ubuntu on DigitalOcean)

$ make check
Making check in src
make[1]: Entering directory `/home/jpm/libCello/src'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/home/jpm/libCello/src'
Making check in tests
make[1]: Entering directory `/home/jpm/libCello/tests'
make  tests
make[2]: Entering directory `/home/jpm/libCello/tests'
gcc -DHAVE_CONFIG_H -I. -I..  -I../tests  -std=gnu99 -Wall -Werror -Wextra -Wno-unused -fnested-functions -g -O2 -MT tests-core.o -MD -MP -MF .deps/tests-core.Tpo -c -o tests-core.o `test -f 'core.c' || echo './'`core.c
cc1: error: unrecognized command line option â-fnested-functionsâ
make[2]: *** [tests-core.o] Error 1
make[2]: Leaving directory `/home/jpm/libCello/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/jpm/libCello/tests'
make: *** [check-recursive] Error 1
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@johnpmayer
Copy link

All tests pass when i remove -fnested-functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants