[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32

2013-04-23 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #18 from Arthur Zhang mail2arthur at gmail dot com 2013-04-23 
14:31:12 UTC ---

(In reply to comment #17)

 What is the driving factor that is causing you to want to make the gcc build 
 so

 complicated?  



I am building release packages for MinGW project. I'd like to keep as more as

gcc4.7.2 release from building/packaging point of view.



 We at http://mingw-w64.sf.net have gone to great lengths to make

 the windows build process simple, and to support many configurations.



Thanks for maintaining mingw-w64 project! I will try it for sure.



 Perhaps you shuld take a step back and look at your overall objective.  You

 shouldn't need many configure options at all.



Before I learn the details of mingw-w64, can you share how mingw-w64 configure

the gcc 4.8.0 Ada build. Thanks.


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32

2013-04-18 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #16 from Arthur Zhang mail2arthur at gmail dot com 2013-04-18 
14:48:50 UTC ---

(In reply to comment #15)

  Why below output has '-march=pentiumpro'?

 

 I think it's the autodetected arch, but maybe I'm confused.  Never mind.



If you mean autodetected arch of the running PC (which has i7 CPU), then I

think it is not, since for gcc v4.7.2 (which is built with only

--build=mingw32):



sh-3.1$ gcc -v -o t.exe test.c

Using built-in specs.

COLLECT_GCC=c:\MinGW\bin\gcc.exe

COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.2/lto-wrapper.exe

Target: mingw32

Configured with: ../gcc-4.7.2/configure

--enable-languages=c,c++,ada,fortran,obj

c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared

--enable-libgo

mp --disable-win32-registry --enable-libstdcxx-debug

--disable-build-poststage1-

with-cxx --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw

Thread model: win32

gcc version 4.7.2 (GCC)

COLLECT_GCC_OPTIONS='-v' '-o' 't.exe' '-mtune=i386' '-march=i386'

...


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32

2013-04-17 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



Arthur Zhang mail2arthur at gmail dot com changed:



   What|Removed |Added



 Status|RESOLVED|NEW

 Resolution|WONTFIX |



--- Comment #12 from Arthur Zhang mail2arthur at gmail dot com 2013-04-17 
19:44:34 UTC ---

I can build successfully with either '--with-arch=i686 --build=mingw32' or

'--build=i686-pc-mingw32', but as I mentioned in comment 10, change build

target cause packaging issue. 



What is the benefit to use '--build=i686-pc-mingw32' than '--with-arch=i686'?



Thanks.


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32

2013-04-17 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #14 from Arthur Zhang mail2arthur at gmail dot com 2013-04-17 
21:02:14 UTC ---

(In reply to comment #13)

  What is the benefit to use '--build=i686-pc-mingw32' than 
  '--with-arch=i686'?

 

 It doesn't force -march=i686 by default.



Why below output has '-march=pentiumpro'?



bash-3.1$ gcc -v  -o t.exe ./test.c

Using built-in specs.

COLLECT_GCC=c:\MinGW\bin\gcc.exe

COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-pc-mingw32/4.8.0/lto-wrappe

r.exe

Target: i686-pc-mingw32

Configured with: ../gcc-4.8.0/configure

--enable-languages=c,c++,ada,fortran,obj

c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared

--enable-libgo

mp --disable-win32-registry --enable-libstdcxx-debug

--enable-version-specific-r

untime-libs --build=i686-pc-mingw32 --prefix=/mingw

Thread model: win32

gcc version 4.8.0 (GCC)

COLLECT_GCC_OPTIONS='-v' '-o' 't.exe' '-mtune=generic' '-march=pentiumpro'

...


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32

2013-04-14 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #10 from Arthur Zhang mail2arthur at gmail dot com 2013-04-14 
22:09:34 UTC ---

(In reply to comment #9)

  On MinGW, GCC 4.7.x Ada built successfully with default (no -with-arch or

  -with-tune) configure.

  

  GCC 4.8.0 s-atopri.* changes breaks same configure:

  

  1. with default (no -with-arch or -with-tune):

failed with five undefined reference (as the top of this ticket)

 

 OK, I missed that, then configure with --build=i686-pc-mingw32.



Thanks for the suggestion, it built successfully too. 

However, since MinGW build has --enable-version-specific-runtime-libs, the old

v4.7.2 has lib installed to \MinGW\lib\gcc\mingw32\4.7.2 (as --build=mingw32)

but now new v4.8.0 build will install lib to ...\gcc\i686-pc-mingw32\4.8.0. For

sure we can use post-install script to move it back from i686-pc-mingw32 dir to

mingw32 dir. Is there any gcc configure switch I can set to do that too?


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32

2013-04-14 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #11 from Arthur Zhang mail2arthur at gmail dot com 2013-04-14 
23:12:48 UTC ---

Will '--exec-prefix=mingw32' work?


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32 --with-arch=i486

2013-04-13 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #7 from Arthur Zhang mail2arthur at gmail dot com 2013-04-14 
04:12:35 UTC ---

clarification:



On MinGW, GCC 4.7.x Ada built successfully with default (no -with-arch or

-with-tune) configure.



GCC 4.8.0 s-atopri.* changes breaks same configure:



1. with default (no -with-arch or -with-tune):

  failed with five undefined reference (as the top of this ticket)



2. with '--with-arch=i486 --with-tune=i686':

  failed with two undefined reference (as comment 1)



3. with '--with-arch=i686':

  build successfully (as comment 3). this may slow the compiler, and leave

i384/i486 arch not be supported so we are looking for a better build workaround

or even better a fix from gcc/ada/libgnat.


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32 --with-arch=i486

2013-04-12 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #5 from Arthur Zhang mail2arthur at gmail dot com 2013-04-12 
20:39:42 UTC ---

(In reply to comment #4)

  The only configure option works for now is '--with-arch=i686'. Thanks.

 

 You're welcome.  But you should remove it, it probably slows down the 
 compiler.



Remove what? The '--with-arch=i686' setting? If so then is there any workaround

to get rid of those undefined references.


[Bug ada/56909] [4.8 regression] s-atopri.adb:multiple undefined references on mingw32 --with-arch=i486

2013-04-11 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #3 from Arthur Zhang mail2arthur at gmail dot com 2013-04-11 
22:08:54 UTC ---

The only configure option works for now is '--with-arch=i686'. Thanks.


[Bug ada/56909] New: [4.8 regression] Ada: s-atopri.adb:multiple undefined references on mingw32

2013-04-10 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



 Bug #: 56909

   Summary: [4.8 regression] Ada: s-atopri.adb:multiple undefined

references on mingw32

Classification: Unclassified

   Product: gcc

   Version: unknown

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: ada

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: mail2art...@gmail.com





Both for 4.8.0 release tarball and SVN 4_8-Branch



Error:



s-atopri.o: In function `system__atomic_primitives__lock_free_read_64':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:80: undefined reference to

`__atomic_load_8'

s-atopri.o: In function `system__atomic_primitives__lock_free_try_write_8':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:101: undefined reference to

`__sync_val_compare_and_swap_1'

s-atopri.o: In function `system__atomic_primitives__lock_free_try_write_16':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:130: undefined reference to

`__sync_val_compare_and_swap_2'

s-atopri.o: In function `system__atomic_primitives__lock_free_try_write_32':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:159: undefined reference to

`__sync_val_compare_and_swap_4'

s-atopri.o: In function `system__atomic_primitives__lock_free_try_write_64':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:188: undefined reference to

`__sync_val_compare_and_swap_8'

collect2.exe: error: ld returned 1 exit status

make[4]: *** [gnatlib-shared-win32] Error 1

make[4]: Leaving directory `/home/t/bd/wk/build/gcc/ada'

make[3]: *** [gnatlib-shared] Error 2

make[3]: Leaving directory `/home/t/bd/wk/build/gcc/ada'

make[2]: *** [gnatlib-shared] Error 2

make[2]: Leaving directory `/home/t/bd/wk/build/mingw32/libada'

make[1]: *** [all-target-libada] Error 2

make[1]: Leaving directory `/home/t/bd/wk/build'

make: *** [all] Error 2





Command:



...

/mingw/mingw32/bin/ranlib rts/libgnarl.a

/mingw/mingw32/bin/ar rc rts/libgmem.a \

  rts/memtrack.o

/mingw/mingw32/bin/ranlib rts/libgmem.a

chmod a-wx rts/*.ali

touch ../stamp-gnatlib-rts

make[5]: Leaving directory `/home/t/bd/wk/build/gcc/ada'

rm -f rts/libgna*.dll

cd rts; `echo /home/t/bd/wk/build/./gcc/xgcc -B/home/t/bd/wk/build/./gcc/

-L/home/t/bd/wk/build/mingw32/winsup/mingw

-L/home/t/bd/wk/build/mingw32/winsup/w32api/lib -isystem

/home/t/bd/wk/gcc-4.8.0/winsup/mingw/include -isystem

/home/t/bd/wk/gcc-4.8.0/winsup/w32api/include -B/mingw/mingw32/bin/

-B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem

/mingw/mingw32/sys-include\

| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`

-shared -shared-libgcc \

 \

-o libgnat-4.8.dll \

a-assert.o a-btgbso.o a-calari.o a-calcon.o a-caldel.o a-calend.o

a-calfor.o a-catizo.o a-cbhama.o a-cbhase.o a-cborse.o a-cbdlli.o a-cbmutr.o

a-cborma.o a-cbprqu.o a-cbsyqu.o a-cdlili.o a-cfdlli.o a-cfhama.o a-cfhase.o

a-cforma.o a-cforse.o a-cgaaso.o a-cgarso.o a-cgcaso.o a-chacon.o a-chahan.o

a-charac.o a-chlat1.o a-chlat9.o a-chtgbo.o a-chtgbk.o a-chtgke.o a-chtgop.o

a-chzla1.o a-chzla9.o a-cidlli.o a-cihama.o a-cihase.o a-ciorma.o a-ciormu.o

a-ciorse.o a-clrefi.o a-cogeso.o a-cohama.o a-cohase.o a-cohata.o a-coinho.o

a-coinve.o a-colien.o a-colire.o a-comlin.o a-contai.o a-convec.o a-cobove.o

a-cofove.o a-coorma.o a-coormu.o a-coorse.o a-coprnu.o a-coteio.o a-crbltr.o

a-crbtgk.o a-crbtgo.o a-crdlli.o a-comutr.o a-cimutr.o a-csquin.o a-cuprqu.o

a-cusyqu.o a-cwila1.o a-cwila9.o a-decima.o a-diocst.o a-direct.o a-direio.o

a-dirval.o a-einuoc.o a-elchha.o a-envvar.o a-except.o a-exctra.o a-finali.o

a-flteio.o a-fwteio.o a-fzteio.o a-inteio.o a-ioexce.o a-iteint.o a-iwteio.o

a-izteio.o a-lcteio.o a-lfteio.o a-lfwtio.o a-lfztio.o a-liteio.o a-liwtio.o

a-liztio.o a-llctio.o a-llftio.o a-llfwti.o a-llfzti.o a-llitio.o a-lliwti.o

a-llizti.o a-locale.o a-ncelfu.o a-ngcefu.o a-ngcoar.o a-ngcoty.o a-ngelfu.o

a-ngrear.o a-nlcefu.o a-nlcoar.o a-nlcoty.o a-nlelfu.o a-nlrear.o a-nllcar.o

a-nllcef.o a-nllcty.o a-nllefu.o a-nllrar.o a-nscefu.o a-nscoty.o a-nselfu.o

a-nucoar.o a-nucoty.o a-nudira.o a-nuelfu.o a-nuflra.o a-numaux.o a-numeri.o

a-nurear.o a-rbtgbo.o a-rbtgbk.o a-rbtgso.o a-sbecin.o a-sbhcin.o a-sblcin.o

a-scteio.o a-secain.o a-sequio.o a-sfecin.o a-sfhcin.o a-sflcin.o a-sfteio.o

a-sfwtio.o a-sfztio.o a-shcain.o a-siocst.o a-siteio.o a-siwtio.o a-siztio.o

a-slcain.o a-ssicst.o a-ssitio.o a-ssiwti.o a-ssizti.o a-stboha.o a-stfiha.o

a-stmaco.o a-storio.o a-strbou.o a-stream.o a-strfix.o a-strhas.o a-string.o

a-strmap.o a-strsea.o a-strsup.o a-strunb.o a-ststio.o a-stunau.o a-stunha.o

a-stuten.o a-stwibo.o a-stwifi.o a-stwiha.o a-stwima.o a-stwise.o a-stwisu.o

a-stwiun.o a-stzbou.o a-stzfix.o a-stzhas.o a-stzmap.o a-stzsea.o a-stzsup.o

a-stzunb.o a-suecin.o a-suenco.o a-suenst.o a-suewst.o a-suezst.o a-suhcin.o

a-sulcin.o a-suteio.o a-swbwha.o a-swfwha.o 

[Bug ada/56909] [4.8 regression] Ada: s-atopri.adb:multiple undefined references on mingw32

2013-04-10 Thread mail2arthur at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56909



--- Comment #1 from Arthur Zhang mail2arthur at gmail dot com 2013-04-10 
16:32:49 UTC ---

Less undefined references if add '--with-arch=i486 --with-tune=i686' to

configure.



s-atopri.o: In function `system__atomic_primitives__lock_free_read_64':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:80: undefined reference to

`__atomic_load_8'

s-atopri.o: In function `system__atomic_primitives__lock_free_try_write_64':

e:\test1\bd\wk\build\gcc\ada\rts/s-atopri.adb:188: undefined reference to

`__sync_val_compare_and_swap_8'

collect2.exe: error: ld returned 1 exit status



Full configure command line:



  $srcdir/configure \

--enable-languages=c,c++,ada,fortran,objc,obj-c++  \

--with-arch=i486 --with-tune=i686 \

--disable-sjlj-exceptions\

--with-dwarf2\

--enable-shared  \

--enable-libgomp \

--disable-win32-registry \

--enable-libstdcxx-debug \

--disable-build-poststage1-with-cxx \

--enable-version-specific-runtime-libs \

--build=mingw32  \

--prefix=/mingw

}