Re: [PATCH] Don't bootstrap libcc1

2014-10-31 Thread Richard Biener
On Fri, Oct 31, 2014 at 12:01 PM, Jakub Jelinek  wrote:
> On Thu, Oct 30, 2014 at 09:39:06AM +0100, Paolo Bonzini wrote:
>> >> --- configure.ac   2014-10-28 14:39:53.018852391 +0100
>> >> +++ configure.ac   2014-10-29 11:43:19.873216226 +0100
>> >> @@ -2677,6 +2677,7 @@ for module in ${configdirs} ; do
>> >>fi
>> >>case ${module},${bootstrap_fixincludes} in
>> >>  fixincludes,no) host_bootstrap_suffix=no-bootstrap ;;
>> >> +libcc1,*) host_bootstrap_suffix=no-bootstrap ;;
>> >>  *) host_bootstrap_suffix=$bootstrap_suffix ;;
>> >>esac
>> >>extrasub_host="$extrasub_host
>> >
>> > Makefile.def has:
>> > host_modules= { module= libcc1; bootstrap=true;
>> > extra_configure_flags=--enable-shared; };
>> > wonder if that bootstrap=true; is desirable there.
>>
>> No, it shouldn't be there
>
> Seems removing that makes the configure.ac change unneeded.
> Bootstrapped/regtested on x86_64-linux and i686-linux (libcc1
> is built after compare, by stage3 compiler), and built
> with --disable-bootstrap on i686-linux (libcc1 is built by
> the system compiler in that case).  Ok for trunk?

Ok.

Thanks,
Richard.

> 2014-10-31  Jakub Jelinek  
>
> * Makefile.def (libcc1): Remove bootstrap=true;.
> * Makefile.in: Regenerated.
>
> --- Makefile.def.jj 2014-10-28 14:40:30.0 +0100
> +++ Makefile.def2014-10-31 10:10:22.723173845 +0100
> @@ -123,8 +123,7 @@ host_modules= { module= gnattools; };
>  host_modules= { module= lto-plugin; bootstrap=true;
> extra_configure_flags='--enable-shared 
> @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
> extra_make_flags='@extra_linker_plugin_flags@'; };
> -host_modules= { module= libcc1; bootstrap=true;
> -   extra_configure_flags=--enable-shared; };
> +host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
>
>  target_modules = { module= libstdc++-v3;
>bootstrap=true;
> --- Makefile.in.jj  2014-10-28 14:39:52.0 +0100
> +++ Makefile.in 2014-10-31 10:10:51.0 +0100
> @@ -1085,9 +1085,7 @@ all-host: maybe-all-gnattools
>  @if lto-plugin-no-bootstrap
>  all-host: maybe-all-lto-plugin
>  @endif lto-plugin-no-bootstrap
> -@if libcc1-no-bootstrap
>  all-host: maybe-all-libcc1
> -@endif libcc1-no-bootstrap
>
>  .PHONY: all-target
>
> @@ -32264,6 +32262,7 @@ configure-libcc1: stage_current
>  @if libcc1
>  maybe-configure-libcc1: configure-libcc1
>  configure-libcc1:
> +   @: $(MAKE); $(unstage)
> @r=`${PWD_COMMAND}`; export r; \
> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
> test ! -f $(HOST_SUBDIR)/libcc1/Makefile || exit 0; \
> @@ -32287,211 +32286,6 @@ configure-libcc1:
>
>
>
> -.PHONY: configure-stage1-libcc1 maybe-configure-stage1-libcc1
> -maybe-configure-stage1-libcc1:
> -@if libcc1-bootstrap
> -maybe-configure-stage1-libcc1: configure-stage1-libcc1
> -configure-stage1-libcc1:
> -   @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
> -   @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcc1
> -   @r=`${PWD_COMMAND}`; export r; \
> -   s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
> -   TFLAGS="$(STAGE1_TFLAGS)"; \
> -   test ! -f $(HOST_SUBDIR)/libcc1/Makefile || exit 0; \
> -   $(HOST_EXPORTS) \
> -   CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
> -   CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
> -   LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS;  \
> -   echo Configuring stage 1 in $(HOST_SUBDIR)/libcc1 ; \
> -   $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcc1 ; \
> -   cd $(HOST_SUBDIR)/libcc1 || exit 1; \
> -   case $(srcdir) in \
> - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
> - *) topdir=`echo $(HOST_SUBDIR)/libcc1/ | \
> -   sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
> -   esac; \
> -   module_srcdir=libcc1; \
> -   $(SHELL) $$s/$$module_srcdir/configure \
> - --srcdir=$${topdir}/$$module_srcdir \
> - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
> - --target=${target_alias} \
> -  \
> - $(STAGE1_CONFIGURE_FLAGS) \
> - --enable-shared
> -@endif libcc1-bootstrap
> -
> -.PHONY: configure-stage2-libcc1 maybe-configure-stage2-libcc1
> -maybe-configure-stage2-libcc1:
> -@if libcc1-bootstrap
> -maybe-configure-stage2-libcc1: configure-stage2-libcc1
> -configure-stage2-libcc1:
> -   @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
> -   @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcc1
> -   @r=`${PWD_COMMAND}`; export r; \
> -   s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
> -   TFLAGS="$(STAGE2_TFLAGS)"; \
> -   test ! -f $(HOST_SUBDIR)/libcc1/Makefile || exit 0; \
> -   $(HOST_EXPORTS) \
> -   $(POSTSTAGE1_HOST_EXPORTS) \
> -   CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
> -   CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS;

Re: [PATCH] Don't bootstrap libcc1

2014-11-01 Thread Jakub Jelinek
On Sat, Nov 01, 2014 at 10:23:24AM +0100, Dominique Dhumieres wrote:
> > Seems removing that makes the configure.ac change unneeded.
> > Bootstrapped/regtested on x86_64-linux and i686-linux (libcc1
> > is built after compare, by stage3 compiler), and built
> > with --disable-bootstrap on i686-linux (libcc1 is built by
> > the system compiler in that case).  Ok for trunk?
> >
> > 2014-10-31  Jakub Jelinek  
> > ...
> 
> This (r216964) breaks bootstrap at stage3
> 
> libtool: link: sed -e 's,^,_,' < ../../work/libcc1/libcc1.sym > 
> .libs/libcc1-symbols.expsym
> libtool: link:  /opt/gcc/build_w/./gcc/xg++ -B/opt/gcc/build_w/./gcc/ 
> -nostdinc++ -nostdinc++ 
> -I/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/include/x86_64-apple-darwin14.0.0
>  -I/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/include 
> -I/opt/gcc/work/libstdc++-v3/libsupc++ 
> -I/opt/gcc/work/libstdc++-v3/include/backward 
> -I/opt/gcc/work/libstdc++-v3/testsuite/util 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs 
> -B/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/bin/ 
> -B/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/lib/ -isystem 
> /opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/include -isystem 
> /opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/sys-include-Wl,-undefined 
> -Wl,dynamic_lookup -o .libs/libcc1.0.so -bundle  .libs/findcomp.o 
> .libs/libcc1.o .libs/names.o .libs/callbacks.o .libs/connection.o 
> .libs/marshall.o   
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs  
> -static-libstdc++ -static-libgcc -Wl,-no_pie ../libiberty/pic/libiberty.a   
> -Wl,-exported_symbols_list,.libs/libcc1-symbols.expsym
> ld: file not found: libstdc++.a
> collect2: error: ld returned 1 exit status
> make[3]: *** [libcc1.la] Error 1
> make[3]: Leaving directory `/opt/gcc/build_w/libcc1'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/opt/gcc/build_w/libcc1'
> make[1]: *** [all-libcc1] Error 2
> make[1]: Leaving directory `/opt/gcc/build_w'
> make: *** [all] Error 2
> 
> Reverting r216964 allowed me to boostrap r216988 on x86_64-apple-darwin14.

So you don't have libstdc++.a in
/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs ?

Jakub


Re: [PATCH] Don't bootstrap libcc1

2014-11-01 Thread Dominique d'Humières

> Le 1 nov. 2014 à 10:43, Jakub Jelinek  a écrit :
> 
> So you don't have libstdc++.a in
> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs ?
> 
>   Jakub

Indeed I have it:

[Book15] gcc/build_w% lf -l 
x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
-rw-r--r-- 1 dominiq staff 9114784 Nov  1 18:48 
x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a

as well as for i386

[Book15] gcc/build_w% lf -l 
x86_64-apple-darwin14.0.0/i386/libstdc++-v3/src/.libs/libstdc++.a
-rw-r--r-- 1 dominiq staff 8184744 Nov  1 18:48 
x86_64-apple-darwin14.0.0/i386/libstdc++-v3/src/.libs/libstdc++.a

The working link command (r216964 reverted) is

libtool: link:  /opt/gcc/build_w/./prev-gcc/xg++ -B/opt/gcc/build_w/./prev-gcc/ 
-B/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/bin/ -nostdinc++ 
-B/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
-B/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs  
-I/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/include/x86_64-apple-darwin14.0.0
  -I/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/include  
-I/opt/gcc/work/libstdc++-v3/libsupc++ 
-L/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
-L/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs 
-Wl,-undefined -Wl,dynamic_lookup -o .libs/libcc1.0.so -bundle  
.libs/findcomp.o .libs/libcc1.o .libs/names.o .libs/callbacks.o 
.libs/connection.o .libs/marshall.o   
-L/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
-L/opt/gcc/build_w/prev-x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs  
-static-libstdc++ -static-libgcc -Wl,-no_pie ../libiberty/pic/libiberty.a   
-Wl,-exported_symbols_list,.libs/libcc1-symbols.expsym

compared to the failing one

libtool: link:  /opt/gcc/build_w/./gcc/xg++ -B/opt/gcc/build_w/./gcc/ 
-nostdinc++ -nostdinc++ 
-I/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/include/x86_64-apple-darwin14.0.0
 -I/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/include 
-I/opt/gcc/work/libstdc++-v3/libsupc++ 
-I/opt/gcc/work/libstdc++-v3/include/backward 
-I/opt/gcc/work/libstdc++-v3/testsuite/util 
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src 
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs 
-B/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/bin/ 
-B/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/lib/ -isystem 
/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/include -isystem 
/opt/gcc/gcc4.10w/x86_64-apple-darwin14.0.0/sys-include-Wl,-undefined 
-Wl,dynamic_lookup -o .libs/libcc1.0.so -bundle  .libs/findcomp.o 
.libs/libcc1.o .libs/names.o .libs/callbacks.o .libs/connection.o 
.libs/marshall.o   
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src 
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs 
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/libsupc++/.libs  
-static-libstdc++ -static-libgcc -Wl,-no_pie ../libiberty/pic/libiberty.a   
-Wl,-exported_symbols_list,.libs/libcc1-symbols.expsym

Dominique



Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Dominique d'Humières
I am still unable to bootstrap darwin14 without revision r216964 reverted. 
Executing the simplified command

/opt/gcc/build_w/gcc/xg++ -B/opt/gcc/build_w/gcc/ 
-L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs -o 
.libs/libcc1.0.so .libs/findcomp.o -static-libstdc++ -static-libgcc

I get

ld: file not found: libstdc++.a
collect2: error: ld returned 1 exit status

while I see

[Book15] build_w/libcc1% ls -l 
/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
-rw-r--r--  1 dominiq  staff  9118792 Nov  8 15:30 
/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a


What am I missing?

TIA

Dominique



Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Jakub Jelinek
On Sat, Nov 08, 2014 at 04:31:28PM +0100, Dominique d'Humières wrote:
> I am still unable to bootstrap darwin14 without revision r216964 reverted. 
> Executing the simplified command
> 
> /opt/gcc/build_w/gcc/xg++ -B/opt/gcc/build_w/gcc/ 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs -o 
> .libs/libcc1.0.so .libs/findcomp.o -static-libstdc++ -static-libgcc
> 
> I get
> 
> ld: file not found: libstdc++.a
> collect2: error: ld returned 1 exit status
> 
> while I see
> 
> [Book15] build_w/libcc1% ls -l 
> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
> -rw-r--r--  1 dominiq  staff  9118792 Nov  8 15:30 
> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
> 
> 
> What am I missing?

That is for somebody familiar with all the Mach-O weirdnesses to look at,
I don't see anything wrong with the above g++ invocation.
Rerun with -v to see how ld is invoked, strace (if Darwin has anything like
that) it to see why it doesn't find that libstdc++.a ?

Jakub


Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Jack Howarth
Dominique,
  I thought from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63773#c1 that you were
having clean bootstraps on darwin. I have tested
x86_64-apple-darwin11/12/13/14 without issues in the creation of
libcc1.0

% otool -L libcc1.0.so
libcc1.0.so:
/sw/lib/gcc5.0/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.21.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1213.0.0)
/sw/lib/gcc5.0/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)

except for the oddity that one isn't being created in the -m32
multilib. Is this a hard bootstrap failure?
  Jack
ps From build log I see...

libtool: link:
/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/./gcc/xg++
-B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/./gcc/ -nostdinc++
-nostdinc++ 
-I/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/include/x86_64-apple-darwin13.4.0
-I/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/include
-I/sw/src/fink.build/gcc50-5.0.0-1000/gcc-5.0-20141107/libstdc++-v3/libsupc++
-I/sw/src/fink.build/gcc50-5.0.0-1000/gcc-5.0-20141107/libstdc++-v3/include/backward
-I/sw/src/fink.build/gcc50-5.0.0-1000/gcc-5.0-20141107/libstdc++-v3/testsuite/util
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src/.libs
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/libsupc++/.libs
-B/sw/lib/gcc5.0/x86_64-apple-darwin13.4.0/bin/
-B/sw/lib/gcc5.0/x86_64-apple-darwin13.4.0/lib/ -isystem
/sw/lib/gcc5.0/x86_64-apple-darwin13.4.0/include -isystem
/sw/lib/gcc5.0/x86_64-apple-darwin13.4.0/sys-include-Wl,-undefined
-Wl,dynamic_lookup -o .libs/libcc1.0.so -bundle  .libs/findcomp.o
.libs/libcc1.o .libs/names.o .libs/callbacks.o .libs/connection.o
.libs/marshall.o
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src/.libs
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/libsupc++/.libs
 -Wl,-no_pie ../libiberty/pic/libiberty.a
-Wl,-exported_symbols_list,.libs/libcc1-symbols.expsym


On Sat, Nov 8, 2014 at 10:31 AM, Dominique d'Humières
 wrote:
> I am still unable to bootstrap darwin14 without revision r216964 reverted. 
> Executing the simplified command
>
> /opt/gcc/build_w/gcc/xg++ -B/opt/gcc/build_w/gcc/ 
> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs -o 
> .libs/libcc1.0.so .libs/findcomp.o -static-libstdc++ -static-libgcc
>
> I get
>
> ld: file not found: libstdc++.a
> collect2: error: ld returned 1 exit status
>
> while I see
>
> [Book15] build_w/libcc1% ls -l 
> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
> -rw-r--r--  1 dominiq  staff  9118792 Nov  8 15:30 
> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
>
>
> What am I missing?
>
> TIA
>
> Dominique
>


Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Iain Sandoe

On 8 Nov 2014, at 15:41, Jakub Jelinek wrote:

> On Sat, Nov 08, 2014 at 04:31:28PM +0100, Dominique d'Humières wrote:
>> I am still unable to bootstrap darwin14 without revision r216964 reverted. 
>> Executing the simplified command
>> 
>> /opt/gcc/build_w/gcc/xg++ -B/opt/gcc/build_w/gcc/ 
>> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs -o 
>> .libs/libcc1.0.so .libs/findcomp.o -static-libstdc++ -static-libgcc
>> 
>> I get
>> 
>> ld: file not found: libstdc++.a
>> collect2: error: ld returned 1 exit status
>> 
>> while I see
>> 
>> [Book15] build_w/libcc1% ls -l 
>> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
>> -rw-r--r--  1 dominiq  staff  9118792 Nov  8 15:30 
>> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
>> 
>> 
>> What am I missing?
> 
> That is for somebody familiar with all the Mach-O weirdnesses to look at,
> I don't see anything wrong with the above g++ invocation.
> Rerun with -v to see how ld is invoked, strace (if Darwin has anything like
> that) it to see why it doesn't find that libstdc++.a ?

This is not really mach-o related, but a consequence of the way in which GCC 
specs substitution works.

Unless the libstdc++-v3/.libs and libsupc++/.libs are visible as -Bx, spec 
substitution will not work (it's not enough to provide -L).

This is done elsewhere (e.g. gnattools), it just needs an appropriate addition 
to the libcc1/Makefile.in

(will try and take a look later in the week, if no-one else gets to it first).

Iain
 

Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Jack Howarth
Iain,
 Any idea why this isn't failing universally? On all of the
machines tested here with 'make bootstrap', the linkage of libcc1.so
finds
the necessary libstdc++ from the set of flags...

-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src/.libs
-L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/libsupc++/.libs

as I posted earlier in this thread. Why wouldn't Dominique be getting
those emitted in his build and shouldn't they suffice?
  Jack

On Sat, Nov 8, 2014 at 4:03 PM, Iain Sandoe  wrote:
>
> On 8 Nov 2014, at 15:41, Jakub Jelinek wrote:
>
>> On Sat, Nov 08, 2014 at 04:31:28PM +0100, Dominique d'Humières wrote:
>>> I am still unable to bootstrap darwin14 without revision r216964 reverted. 
>>> Executing the simplified command
>>>
>>> /opt/gcc/build_w/gcc/xg++ -B/opt/gcc/build_w/gcc/ 
>>> -L/opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs -o 
>>> .libs/libcc1.0.so .libs/findcomp.o -static-libstdc++ -static-libgcc
>>>
>>> I get
>>>
>>> ld: file not found: libstdc++.a
>>> collect2: error: ld returned 1 exit status
>>>
>>> while I see
>>>
>>> [Book15] build_w/libcc1% ls -l 
>>> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
>>> -rw-r--r--  1 dominiq  staff  9118792 Nov  8 15:30 
>>> /opt/gcc/build_w/x86_64-apple-darwin14.0.0/libstdc++-v3/src/.libs/libstdc++.a
>>>
>>>
>>> What am I missing?
>>
>> That is for somebody familiar with all the Mach-O weirdnesses to look at,
>> I don't see anything wrong with the above g++ invocation.
>> Rerun with -v to see how ld is invoked, strace (if Darwin has anything like
>> that) it to see why it doesn't find that libstdc++.a ?
>
> This is not really mach-o related, but a consequence of the way in which GCC 
> specs substitution works.
>
> Unless the libstdc++-v3/.libs and libsupc++/.libs are visible as -Bx, 
> spec substitution will not work (it's not enough to provide -L).
>
> This is done elsewhere (e.g. gnattools), it just needs an appropriate 
> addition to the libcc1/Makefile.in
>
> (will try and take a look later in the week, if no-one else gets to it first).
>
> Iain
>


Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Dominique d'Humières

> Le 8 nov. 2014 à 22:55, Jack Howarth  a écrit :
> 
> Iain,
> Any idea why this isn't failing universally? On all of the
> machines tested here with 'make bootstrap', the linkage of libcc1.so
> finds
> the necessary libstdc++ from the set of flags...
> 
> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src
> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src/.libs
> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/libsupc++/.libs
> 
> as I posted earlier in this thread. Why wouldn't Dominique be getting
> those emitted in his build and shouldn't they suffice?
>  Jack

Because you bootstrap with clang (I confirm it) while I am bootstrapping with 
gcc 4.9 for Ada.

Dominique




Re: [PATCH] Don't bootstrap libcc1

2014-11-08 Thread Jack Howarth
Dominique,
That is curious. I wouldn't have thought that the compiler
selection would have had such a radical effect on the linkage flags
emitted for the build directories.
  Jack


On Sat, Nov 8, 2014 at 4:59 PM, Dominique d'Humières  wrote:
>
>> Le 8 nov. 2014 à 22:55, Jack Howarth  a écrit :
>>
>> Iain,
>> Any idea why this isn't failing universally? On all of the
>> machines tested here with 'make bootstrap', the linkage of libcc1.so
>> finds
>> the necessary libstdc++ from the set of flags...
>>
>> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src
>> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src/.libs
>> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/libsupc++/.libs
>>
>> as I posted earlier in this thread. Why wouldn't Dominique be getting
>> those emitted in his build and shouldn't they suffice?
>>  Jack
>
> Because you bootstrap with clang (I confirm it) while I am bootstrapping with 
> gcc 4.9 for Ada.
>
> Dominique
>
>


Re: [PATCH] Don't bootstrap libcc1

2014-11-09 Thread Iain Sandoe
Jack, Dominique,

I think we have two issues here - let's make sure we don't derail dealing with 
the first one.

On 8 Nov 2014, at 22:08, Jack Howarth wrote:

>That is curious. I wouldn't have thought that the compiler
> selection would have had such a radical effect on the linkage flags
> emitted for the build directories.
>  Jack
> 
> 
> On Sat, Nov 8, 2014 at 4:59 PM, Dominique d'Humières  
> wrote:
>> 
>>> Le 8 nov. 2014 à 22:55, Jack Howarth  a écrit :
>>> 
>>> Iain,
>>>Any idea why this isn't failing universally? On all of the
>>> machines tested here with 'make bootstrap', the linkage of libcc1.so
>>> finds
>>> the necessary libstdc++ from the set of flags...
>>> 
>>> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src
>>> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/src/.libs
>>> -L/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libstdc++-v3/libsupc++/.libs
>>> 
>>> as I posted earlier in this thread. Why wouldn't Dominique be getting
>>> those emitted in his build and shouldn't they suffice?
>>> Jack
>> 
>> Because you bootstrap with clang (I confirm it) while I am bootstrapping 
>> with gcc 4.9 for Ada.

We all agree that it's not obvious that the bootstrap compiler should make any 
difference to this.

Looking at the logs for my trunk build from last night:
 * x86_64-darwin12
 * bootstrap compiler = gcc-4.9
 * trunk checkout 217252
 * with alias fix for ipa-icf
 * with a temporary mod to put -B options for libstdc++ and libsupc++ for 
libcc1.
 * all langs including objc++, java and Ada.

- The [libcc1] config is using the stage#3 compiler (according to 
libcc1/config.log)
- The [libcc1] build is using the stage#3 compiler as far as my build logs 
record.
- my stage3 gcc/auto-host.h does not differ in any material way from the 
stage1-gcc/suto-host.h

So I think we need to do some analysis; in particular, the config and build 
logs for libcc1 when clang is the bootstrap compiler.  Let's take this off-list 
and raise a PR if we find a separate problem.



As for the initial reported problem here, my analysis remains the same - we 
need to provide "-B" options for the libraries that are mentioned, so that spec 
substitutution works.

Iain