[Bug target/64633] New: Can't build LibSSP for Mipsel need to be compile with -fPIC

2015-01-16 Thread peron.clem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64633

Bug ID: 64633
   Summary: Can't build LibSSP for Mipsel need to be compile with
-fPIC
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: peron.clem at gmail dot com

Created attachment 34466
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34466&action=edit
Config.log of GCC

Hi,

The objects of libssp aren't build with the -fPIC flag and i got an error at
link time when gcc try to create libssp.so.

.libs/ssp.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used
when making a shared object; recompile with -fPIC

My script that call configure and make GCC.

My GCC version is 4.9.2, my host is 

# ) GCC stage2
mkdir -p obj/gcc-final
pushd obj/gcc-final
${SRCDIR}/${GCC}/configure  \
--target=${TARGET}  \
--with-arch=mips1   \
--with-float=soft   \
--prefix=${DESTDIR} \
--disable-multilib  \
--disable-nls   \
--disable-static\
--enable-languages=c,c++\
--enable-__cxa_atexit   \
--enable-nofmult\
--enable-poison-system-directories  \
--with-pkgversion=Withings  \
--enable-threads=posix  \
--with-gmp=${LIBDIR}\
--with-mpc=${LIBDIR}\
--with-mpfr=${LIBDIR}   \
--with-sysroot=${SYSROOT}
make ${MAKEJ}
make install
popd

Do you need more information ?? I Attach the config.log.

Thanks for your help.


[Bug middle-end/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together

2014-10-06 Thread peron.clem at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Clément Péron  changed:

   What|Removed |Added

 CC||peron.clem at gmail dot com

--- Comment #12 from Clément Péron  ---
The Bugs is still present in GCC 4.6.4 and 4.8.2.

.strX.X try to optimize string constants but when you disable it the var are
moved into .rodata instead of .rodata.__function when the -fdata-sections is
enabled.

I post a question on StackOverflow :
http://stackoverflow.com/questions/26100976/var-declare-inside-a-printf-cant-be-garbage-collected-by-gcc?answertab=oldest#tab-top

And i sent a message on GCC-Help mailing list :
https://gcc.gnu.org/ml/gcc-help/2014-10/msg0.html

It's really annoying when you try to optimize the size of the executable.

Thanks