[Bug libstdc++/58638] libstdc++ builds as non-PIC when --with-pic is specified

2016-11-20 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58638

Alec Ari  changed:

   What|Removed |Added

 CC||neotheuser at ymail dot com

--- Comment #11 from Alec Ari  ---
This fix worked for me:

--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -121,8 +121,8 @@ if test "$enable_shared" = yes; then
   glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"

 else
-  glibcxx_lt_pic_flag=
-  glibcxx_compiler_pic_flag=
+  glibcxx_lt_pic_flag="-prefer-pic"
+  glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
   glibcxx_compiler_shared_flag=
 fi

(no elif / no else if)

Thanks guys, finally having GCC compiled!

[Bug libstdc++/28811] --with-pic vs static libraries and libstdc++

2016-11-20 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28811

--- Comment #26 from Alec Ari  ---
To avoid fully recompiling GCC, I modified libstdc++-v3/configure (not .ac) and
made the following change:

--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -15014,8 +15014,8 @@ if test "$enable_shared" = yes; then
   glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"

 else
-  glibcxx_lt_pic_flag=
-  glibcxx_compiler_pic_flag=
+  glibcxx_lt_pic_flag="-prefer-pic"
+  glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
   glibcxx_compiler_shared_flag=
 fi

Special thanks to the guys in this thread, problem solved.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58638

[Bug libstdc++/28811] --with-pic vs static libraries and libstdc++

2016-11-19 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28811

Alec Ari  changed:

   What|Removed |Added

 CC||neotheuser at ymail dot com

--- Comment #25 from Alec Ari  ---
Created attachment 40087
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40087=edit
relocation X against symbol `Y can not be used...

I still have this problem, just ran git pull on master branch, this is my
configure line:

$ cd gcc && mkdir build && cd build

$ ../configure --prefix=/home//git-toolchain-bin/usr
--with-local-prefix=/home//git-toolchain-bin/usr
--with-native-system-header-dir=/home//git-toolchain-bin/usr/include
--disable-nls --disable-shared --disable-multilib --disable-libatomic
--disable-libgomp --disable-libmpx --disable-libquadmath --disable-libssp
--disable-libvtv --disable-libstdcxx-pch --enable-languages=c,c++
--disable-werror --without-isl --disable-libcilkrts --disable-libitm
--disable-libsanitizer --disable-lto --disable-gold

Replacing --disable-libstdcxx-pch with --disable-libstdcxx brings me this:

xg++: error: unrecognized command line option '-funconfigured-libstdc++-v3'

Adding/removing c++ from enabled languages seems to have no effect. Recompiling
Binutils (2.27 branch) with CFLAGS="-O2 -fPIC" and CXXFLAGS="${CFLAGS}" added
to configure line did not fix the issue (nor change it in any way) and
compiling GCC with that same option causes it to die much earlier.

This is as far as I've got so far trying to build a toolchain sysroot, very
close!

[Bug other/78424] New: intl reincludes sysroot into searching for ld

2016-11-18 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78424

Bug ID: 78424
   Summary: intl reincludes sysroot into searching for ld
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: neotheuser at ymail dot com
  Target Milestone: ---

Created attachment 40085
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40085=edit
intl duplicated directory error

Hello! I have switched to GLIBC and the GMP issue is gone, but now when GCC
builds, it searches for sysroot/usr/lib/libc.so.6 inside
sysroot/git-toolchain-bin. It should be an absolute path, which is simply just
sysroot/usr/lib/libc.so.6.

"/home//git-toolchain-bin/usr/x86_64-pc-linux-gnu/bin/ld: cannot find
/home//git-toolchain-bin/usr/lib/libc.so.6 inside
/home//git-toolchain-bin"

~/git-toolchain-bin/usr/lib/libc.so.6 exists, but there is no
/home//git-toolchain-bin/home//git-toolchain-bin/usr/lib/libc.so.6
as that would be silly.

Configure line is as follows:

mkdir build && cd build && ../configure
--prefix=/home//git-toolchain-bin/usr
--with-local-prefix=/home//git-toolchain-bin/usr
--with-sysroot=/home//git-toolchain-bin --disable-nls
--disable-shared --disable-multilib --disable-libatomic --disable-libgomp
--disable-libmpx --disable-libquadmath --disable-libssp --disable-libvtv
--disable-libstdcxx --enable-languages=c,c++ --disable-lto --with-system-zlib
--disable-werror --disable-gold --without-isl --disable-libcilkrts
--disable-libitm --disable-libsanitizer

Removing or keeping --with-local-prefix has no effect.

I initially started with having --with-native-system-header-dir set to
sysroot-dir/include but having --with-sysroot=sysroot-dir set along with it
caused redundancies, so I dropped --with-native-system-header-dir.

--with-build-sysroot caused issues finding stdio.h (which was present in the
directory that --with-native-system-header-dir was set to, not too sure what
happened there, just changed configure options) so changing it to simply
--with-sysroot got me a little further.

Build log attached.

[Bug other/78410] gen-fac.c: undefined references

2016-11-17 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78410

Alec Ari  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Alec Ari  ---
Will switch to GLIBC, thank you!

[Bug other/78410] New: gen-fac.c: undefined references

2016-11-17 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78410

Bug ID: 78410
   Summary: gen-fac.c: undefined references
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: neotheuser at ymail dot com
  Target Milestone: ---

Created attachment 40075
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40075=edit
build error

Hello, I'm trying to build a complete native toolchain into a custom directory
(not /usr) similar to what crosstool-ng does. I've already built binutils and
newlib, now just trying to build the first pass GCC compiler, this is my
configure line for GCC:

mkdir -p build && cd build && ../configure --with-newlib --without-headers
--target=x86_64-pc-linux-gnu --prefix=/home//git-toolchain-bin
--disable-nls --disable-shared --disable-multilib --disable-decimal-float
--disable-threads --disable-libatomic --disable-libgomp --disable-libmpx
--disable-libquadmath --disable-libssp --disable-libvtv --disable-libstdcxx
--enable-languages=c --disable-lto --with-system-zlib --disable-werror
--disable-gold --without-isl
--with-native-system-header-dir=/home//git-toolchain-bin/include
--disable-libcilkrts --disable-libitm --disable-libsanitizer
--with-local-prefix=/home//git-toolchain-bin

The following error is attached. Any help and suggestions would be great!

Alec Ari