0

On my system default gcc version is 4.4.7 , But i want to build glib library with gcc 6.3 version. For that i tried running ./configure from glib source as shown below:

../configure  CC="/version/global/pkgs/gcc/v6.3.0/bin/gcc" CFLAGS='-fPIC' CXXFLAGS='-fPIC' --enable-static=yes --prefix=/home/kallel/glib_63/glib-2.56.1/new_glib63 --enable-libmount=no --with-pcre=/home/kallel/pcre_lib/pcre-8.20/pcre_library

Once after building glib library. To see on which gcc compiler version it got built with following command:-

strings -a libglib-2.0.so.0.5600.1 | grep "GCC: ("
o/p:-
 GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-9)
 GCC: (Synopsis) 6.3.0
 GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-4)

I could not understand why it is still showing output with 4.4.7, Please help me in understanding the output. Is there anything wrong in my ./configure command? How do we make sure that library was built with gcc 6.3

1 Answer 1

1

I could not understand why it is still showing output with 4.4.7

Your library contains object code that you built, as well as parts of GLIBC that are required to support shared libraries (crti.o, crtn.o, etc.).

These parts will continue to show whatever GCC they were built with, regardless of what you build glib code with.

Sign up to request clarification or add additional context in comments.

2 Comments

But the original library i.e glib is compiled with gcc 6.3 right ?
@santosh Yes, it is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.