Advertisement

GNU Autoconf problems (or perhaps kdevelop problems :) )

Started by October 21, 2004 06:08 AM
1 comment, last by George2 20 years, 1 month ago
Hi! One could say i'm fairly new to autoconf. I have quite unusual need for g++ compiler flags. My program needs -nostdlib and defines own _start and __gxx_personality_v0. (I'm very aware of implications of this). Now my true problem is that autoconf tries to compile a test app and fails running it (segfault). It uses the same flags as is used for my prog (obviously). That test app does not define the start point _start so linker assumes and assumes wrong... Is there way to define my own test to be used when flag -nostdlib is found? I'm using (read evaluating) kdevelop so the "way" should be kdevelop friendly. I guess it will be easier to just write my own makefile.
Quote: configure:2068: g++ -Os -g -nostdlib conftest.cc >&5 /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074 configure:2071: $? = 0 configure:2117: result: a.out configure:2122: checking whether the C++ compiler works configure:2128: ./a.out *PATH*/configure: line 1: 6130 Segmentation fault ./$ac_file configure:2131: $? = 139 configure:2140: error: cannot run C++ compiled programs.
I think it works something like this... (consider this pseudo code)
BAK_CFLAGS:=&CFLAGSCFLAGS:=-nostdlibAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]])],AC_MSG_RESULT('yes'),AC_MSG_ERROR("Requires -nostdlib compiler flag."))CFLAGS:=$BAK_CFLAGS
Advertisement
Quote: Original post by Winograd
Hi!

One could say i'm fairly new to autoconf. I have quite unusual need for g++ compiler flags. My program needs -nostdlib and defines own _start and __gxx_personality_v0. (I'm very aware of implications of this).

Now my true problem is that autoconf tries to compile a test app and fails running it (segfault). It uses the same flags as is used for my prog (obviously). That test app does not define the start point _start so linker assumes and assumes wrong...
Is there way to define my own test to be used when flag -nostdlib is found? I'm using (read evaluating) kdevelop so the "way" should be kdevelop friendly. I guess it will be easier to just write my own makefile.

Quote:
configure:2068: g++ -Os -g -nostdlib conftest.cc >&5
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
configure:2071: $? = 0
configure:2117: result: a.out
configure:2122: checking whether the C++ compiler works
configure:2128: ./a.out
*PATH*/configure: line 1: 6130 Segmentation fault ./$ac_file
configure:2131: $? = 139
configure:2140: error: cannot run C++ compiled programs.


I think it would be best if you post the configure.in file in the project's directory.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon

This topic is closed to new replies.

Advertisement