Unable to print traceback or stackdump using GCC-4.8.5 as starting with GCC version 4.6, the default setting has been changed to -fomit-frame-pointer. Read in the internet like the default can be reverted to -fno-omit-frame-pointer by configuring GCC with the --enable-frame-pointer configure option. So I installed GCC-4.5.3 in my home directory with below configure options.
Configure options:
../gcc-4.5.3/configure -v --prefix=/home/GCC1-4.5.3/usr --infodir=/home/GCC1-4.5.3/usr/build/share/info --mandir=/home/GCC1-4.5.3/usr/build/share/man --libdir=/home/GCC1-4.5.3/usr/build/lib64 --libexecdir=/home/GCC1-4.5.3/usr/build/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java --with-gxx-include-dir=/home/GCC1-4.5.3/usr/build/include --enable-ssp --enable-frame-pointer --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/home/GCC1-4.5.3/usr/build/lib64 --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.5.3 --without-system-libunwind --with-arch-32=i686 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Before including my installed GCC compiler my Makefile.common looks as below:
CROSS_COMPILER_PREFIX = x86_64-dx-linux-gnu
ADDR2LINE = $(CROSS_COMPILER_PREFIX)-addr2line
AR = $(CROSS_COMPILER_PREFIX)-ar
AS = $(CROSS_COMPILER_PREFIX)-as
CXX = $(CROSS_COMPILER_PREFIX)-c++
CXXFILT = $(CROSS_COMPILER_PREFIX)-c++filt
CPP = $(CROSS_COMPILER_PREFIX)-cpp
GXX = $(CROSS_COMPILER_PREFIX)-g++
GCC = $(CROSS_COMPILER_PREFIX)-gcc
GCCBUG = $(CROSS_COMPILER_PREFIX)-gccbug
GCOV = $(CROSS_COMPILER_PREFIX)-gcov
LD = $(CROSS_COMPILER_PREFIX)-ld
After installing, I have included the compiler in my Makefile.common as below:
CROSS_COMPILER_PREFIX = x86_64-dx-linux-gnu (GCC-4.8.5 Prefix)
CROSS_COMPILER_PREFIX = x86_64-suse-linux(My installed GCC-4.5.3 Prefix)
ADDR2LINE = $(CROSS_COMPILER_PREFIX)-addr2line
CXX = $(CROSS_COMPILER_PREFIX)-c++-4.5.3
CXXFILT = $(CROSS_COMPILER_PREFIX)-c++filt
CPP = $(CROSS_COMPILER_PREFIX)-cpp-4.5.3
GXX = $(CROSS_COMPILER_PREFIX)-g++-4.5.3
GCC = $(CROSS_COMPILER_PREFIX)-gcc-4.5.3
GCCBUG = $(CROSS_COMPILER_PREFIX)-gccbug
GCOV = $(CROSS_COMPILER_PREFIX)-gcov-4.5.3
LD = $(CROSS_COMPILER_PREFIX)-ld
After including when I try to give make command it fails with below error
/usr/bin/ld: cannot find /usr/lib64/libmvec_nonshared.a
/usr/bin/ld: cannot find /lib64/libmvec.so.1
collect2: ld returned 1 exit status
Also I observed that these both libraries are present in another path and not present in the above mentioned (/usr/lib64/, /lib64) path. I don't have permissions to run sudo command or to create link or make any changes in /usr/ path. The below is the output when I run ld -lmvec --verbose.
attempt to open /usr/x86_64-suse-linux/lib64/libmvec.so failed
attempt to open /usr/x86_64-suse-linux/lib64/libmvec.a failed
attempt to open /usr/lib64/libmvec.so failed
ld: cannot find -lmvec
Note:
The make is successfull with GCC_4.8.5 where as the make is failing with my installed GCC_4.5.3.
Can anyone please help me to resolve this issue? Do I need to change anything in Makefile.common? why the make is successfull with GCC_4.8.5 and it is failing for GCC_4.5.3 ?
How to make changes in Makefile to make ld search in the library present path ?
In addition to this query can any one pls help me to check whether frame-pointer is omitted or not?
Thanks in Advance.