Log in

View Full Version : Compiling GCC for MinGW & Cross-Compiling with Linux


Pages : [1] 2 3 4 5

cc979
5th March 2006, 19:52
I've made this little guide to get a working MinGW gcc-4.0.3 up to gcc-4.1.2 (should work with binutils too)

i did have the latest build on my googlepage but it ran out of bandwidth, unless anybody canrecommend a freehost - its back to the previous way

try this (check http://www.mingw.org/download.shtml for updates)

MinGW-5.1.3-[candidate only base-files]

http://prdownloads.sf.net/mingw/MinGW-5.1.3.exe?download

MSYS-1.0.10.exe

http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download

if you need cvs
http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download

and when installing if the connection drops, click retry (sf problem)

and i recommend to get latest runtime,w32api headers
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82721&release_id=158844
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82721&release_id=158847

and the new binutils that allows spaces in filenames
https://sourceforge.net/forum/forum.php?forum_id=661143

and if building hogs your system i recommend editing the msys.bat

change the:
line 62: start rxvt ... into start /LOW rxvt ... and
line 66: start sh ... into start /LOW sh ...
(more reliable for your system, you can do other while building)

get gcc-sources try here:
http://www.mirrorservice.org/sites/sources.redhat.com/pub/gcc/

release directory or whatever


***** most of the pre-released/snapshots of gcc needs bison,flex and sometimes libiconv, libtool

bison into \mingw\ directory --
http://gnuwin32.sourceforge.net/downlinks/bison-bin-zip.php
http://gnuwin32.sourceforge.net/downlinks/bison-dep-zip.php

flex into \mingw\ directory --
http://gnuwin32.sourceforge.net/downlinks/flex-bin-zip.php

libtool into \mingw\ directory --
http://gnuwin32.sourceforge.net/downlinks/libtool-bin-zip.php

libiconv into \mingw\
http://gnuwin32.sourceforge.net/downlinks/libiconv-bin-zip.php
http://gnuwin32.sourceforge.net/downlinks/libiconv-dep-zip.php

and maybe newer gnu-make (not needed but useful and sometimes buggy)
http://prdownloads.sourceforge.net/mingw/mingw32-make-3.80.0-3.exe?download

installing the newer make delete/rename old msys\1.0\bin\make.exe and install the new make into \mingw\ and then
rename the new mingw32-make.exe into make.exe

make --version to check

or compile your own from http://ftp.gnu.org/gnu/make/

***

The directory that should contain system headers does not exist:
/usr/include

create an empty include folder in \msys\1.0\

***

make[2]: Leaving directory `/home/user/svn/gcc-4_1-branch/build/libcpp'
make[2]: Entering directory `/home/user/svn/gcc-4_1-branch/build/gcc'
Makefile:1280: *** target pattern contains no `%'. Stop.
make[2]: Leaving directory `/home/user/svn/gcc-4_1-branch/build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/user/svn/gcc-4_1-branch/build'
make: *** [all] Error 2

check makefile = LD = ld
(not LD = ?:/mingw/bin/../lib/gcc/mingw32/???/../../../../mingw32/bin/ld.exe)
i think related to --with-gcc --with-gnu-ld --with-gnu-as

or delete ld.exe from \mingw\mingw32\bin or empty the folder that's what i did
(but i think the newer binutils fixes that anyway, will check later)

****

Step 1

cd yourgcc-src
mkdir build
cd build

Step 2
tip. before you install new gcc zip your \mingw\ directory ... you never know

Pass 1

append "&> output-results.txt" without quotes to echo to file (displayed text into a file)

after some experiments, i found symbolic links are broke, not sure on how to fix it

you can append: --with-dwarf2 -s (for silent output) to configure line
you can append &>result.txt to pipe any shell output to file


*** for gcc 4.1+ use bison,flex see notes on ld.exe

*** for gcc 4.2+ append --disable-werror

*** updated configure 2006.12.23 (remove --host=mingw32 --target=mingw32 to build for your system)

(remove '"CFLAGS=-O2" "LDFLAGS=-s" --enable-optimize' if debugging the compiler)


for i386
../configure --enable-languages=c -v --enable-optimize --host=mingw32 --build=mingw32 --target=mingw32 --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x

for i686
../configure --enable-languages=c -v --enable-optimize --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x



make "CFLAGS=-O2" "LDFLAGS=-s"
or
make bootstrap "CFLAGS=-O2" "LDFLAGS=-s"

* if the bootstrap fails something is wrong with gcc compiler itself, means it can't rebuild itself with itself


(you can save it for later, if you re-install mingw just copy the folder back in)
make DESTDIR=/home/gcc-build install

(the normal install)
make install

make html
(if you want the html - docs, there should be here yourgcc-src\libstdc++-v3\docs\html )

close and re-load ming

Step 3

Pass 2

empty your build directory

if you need g77 its not supported in gcc 4+, try gcc 3.4.4
but if want to build gfortran read further down

available languages are: c,c++,f95,java,objc,obj-c++,treelang

*** for gcc 4.2+ append --disable-werror


for i386
../configure --enable-languages=c,c++ -v --enable-optimize --host=mingw32 --build=mingw32 --target=mingw32 --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x

for i686
../configure --enable-languages=c,c++ -v --enable-optimize --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x



make "CFLAGS=-O2" "LDFLAGS=-s"
or
make bootstrap "CFLAGS=-O2" "LDFLAGS=-s"

* if the bootstrap fails something is wrong with gcc compiler itself, means it can't rebuild itself with itself


(you can save it for later, if you re-install mingw just copy the folder back in)
make DESTDIR=/home/gcc-build install

(the normal install)
make install

close and re-load ming

Step 4

Pass 3 ( build gcc with gcc with profiled bootstrap to get a faster compiler)
this not necessary but you get a faster compiler

empty your build directory


for i386
../configure --enable-languages=c,c++ -v --enable-optimize --host=mingw32 --build=mingw32 --target=mingw32 --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x

for i686
../configure --enable-languages=c,c++ -v --enable-optimize --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x



make "CFLAGS=-O2" "LDFLAGS=-s"
or
make bootstrap "CFLAGS=-O2" "LDFLAGS=-s"

* if the bootstrap fails something is wrong with gcc compiler itself, means it can't rebuild itself with itself


(you can save it for later, if you re-install mingw just copy the folder back in)
make DESTDIR=/home/gcc-build install

(the normal install)
make install

***

Fortran, GMP, MPFR

Building GMP

download gmp from
http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/

cd your gmp-src

./configure --host=mingw32 --build=mingw32 --target=mingw32 --prefix=/mingw

make DESTDIR=/home/gcc-libs install

make install

Building MPFR

download mpfr from
http://www.mpfr.org/mpfr-current/

cd your mpfr-src

./configure --host=mingw32 --build=mingw32 --target=mingw32 --prefix=/mingw

make DESTDIR=/home/gcc-libs install

make install

Building Fortran (F95)

cd your gcc-src
mkdir build
cd build


../configure --enable-languages=f95 -v --enable-optimize --prefix=/mingw --oldincludedir=/mingw/include --enable-threads --disable-nls --disable-win32-registry --disable-shared --without-x


make "CFLAGS=-O2 " "LDFLAGS=-s"
or
make bootstrap "CFLAGS=-O2" "LDFLAGS=-s"


(save for later installs)
make DESTDIR=/home/f95-build install

make install

**** more to add later

Compiling GCC for MinGW from Linux

update in progress...

see later posts

**** more to add later

thanks to those who helped, you know who you are

cheers

Inventive Software
6th March 2006, 15:03
Maybe adding Fortran (g77)? I'm 95% certain that'll compile with no problems. GCC/MinGW usually stumbles with ObjectiveC and/or Java.

Why do people insist on having GCC 4 working with MinGW? What was wrong with GCC 3.4.5? I've been using that with no problems at all.

cc979
6th March 2006, 15:30
Maybe adding Fortran (g77)? I'm 95% certain that'll compile with no problems. GCC/MinGW usually stumbles with ObjectiveC and/or Java.

Why do people insist on having GCC 4 working with MinGW? What was wrong with GCC 3.4.5? I've been using that with no problems at all.

can do, i myself - not used fortran for ages

people must like new toys to play with - optimizing stuff gcc 4.1 sounds interesting

leowai
8th March 2006, 17:52
@cc979, thanks for the guide. :)

And I've a suggestion here. I see the commands to MinGW are mixed with your comments. It will be much clearer if you put the commands in code box like this: ;) ../configure --enable-languages=c --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --disable-win32-registry --disable-shared --enable-sjlj-exceptions --without-x --enable-hash-synchronization --enable-libstdcxx-debug

Or using "quote":
../configure --enable-languages=c --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --disable-win32-registry --disable-shared --enable-sjlj-exceptions --without-x --enable-hash-synchronization --enable-libstdcxx-debug

cc979
9th March 2006, 12:59
@cc979, thanks for the guide. :)

And I've a suggestion here. I see the commands to MinGW are mixed with your comments. It will be much clearer if you put the commands in code box like this: ;) ../configure --enable-languages=c --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --disable-win32-registry --disable-shared --enable-sjlj-exceptions --without-x --enable-hash-synchronization --enable-libstdcxx-debug

Or using "quote":

can do
cheers

cc979
23rd March 2006, 22:06
@cc979
Nice guide for people who already know how to do it, but the whole compilation will never be doable for the average Joe (unless you're a clairvoyant), due to lots of path typos (like what the h*** is /sys/1.0/ directory ), missing or messy steps and ambiguities. A working gcc compilation guide should have about 30 detailed steps, not 4 or 5.

after installing MSYS you get a /sys/1.0/ directory or where you have installed

in '30 steps' have tried ?

path typo ? tell me where

cc979
24th March 2006, 16:06
/sys/1.0/ should be /msys/1.0/ ..

I mean about 30 steps like this (http://forum.doom9.org/showthread.php?p=723782#post723782) otherwise it's not a step by step guide, but a quick reference (kind of reminder) for people who already know how to compile it. I'll try to fix the gcc guide (for gcc-core-4.2.x) and post it later here.

cheers

cc979
24th November 2006, 05:38
i've built build gcc-4.2-20061114, gcc-4.3-20061118

if anyone wants them, not tried build ffdshow with them yet

check out, about the warning: format '%I64d' expects type
'int', but argument 3 has type 'gcov_type'

http://www.nabble.com/-Bug-bootstrap-25502---New%3A-Werror-problem-in-build-tf777349.html#a2025034

gmp-4.2,mpfr-2.2.0 (not sure the libs are needed for the gcc-dists) and updated bison,flex,libtool,libiconv was used to build the latest snapshots of gcc 4.2 & 4.3

read the first page for more details

the files
http://www.mytempdir.com/1079929

foxyshadis
24th November 2006, 07:56
Yes! This is awesome, mainly because I've been itching to use OpenMP in ffmpeg and gcc 4.3 finally implements it. I'll probably have to run some experiments with it first to see how functional it is.

cc979
24th November 2006, 14:09
Yes! This is awesome, mainly because I've been itching to use OpenMP in ffmpeg and gcc 4.3 finally implements it. I'll probably have to run some experiments with it first to see how functional it is.

your welcome, let me know how it goes for you - i had problems with the baseclasses compiling ffdshow myself, help - if you can do it

cheers

cc979
25th November 2006, 01:32
with gcc-4.3 ffdshow fails on baseclasses

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

and some else ran into compiling other sources
http://www.nabble.com/gcc-4.1%3A-Weird-rejection-of-__stdcall-aliases-tf828763.html#a2150693

foxyshadis
25th November 2006, 01:57
I was only going to use it for lavc/mplayer, so that shouldn't affect me to much at the moment. It'll be interesting trying to test for any bugs introduced though.

btw, was this cross-compiled from linux, or compiled off the existing 4.0/4.1 gcc for win32?

cc979
25th November 2006, 17:29
I was only going to use it for lavc/mplayer, so that shouldn't affect me to much at the moment. It'll be interesting trying to test for any bugs introduced though.

btw, was this cross-compiled from linux, or compiled off the existing 4.0/4.1 gcc for win32?

i used win32 mingw gcc 4.0.3 if remember as it was after few failed attempts, till i realised what it needed

cc979
28th November 2006, 21:01
build 4.1.2 20061127 (prerelease) - patched
can build ffdshow needs testing

http://www.mytempdir.com/1088799

clsid
19th December 2006, 13:01
Somehow all the executables in your builds are much larger than 'official' mingw32 builds. I once made a build myself and had the same problem.

Perhaps the executables contain debugging or other unneeded code? Hopefully you can figure out what is wrong and 'fix' it. As it might affect the performance of the compilers too.

cc979
19th December 2006, 21:55
Somehow all the executables in your builds are much larger than 'official' mingw32 builds. I once made a build myself and had the same problem.

Perhaps the executables contain debugging or other unneeded code? Hopefully you can figure out what is wrong and 'fix' it. As it might affect the performance of the compilers too.

i had it include GMP, MPFR libs maybe thats affecting it, i look into it

cc979
23rd December 2006, 12:05
new build of gcc-4.1.2

http://www.mytempdir.com/1130278

@clsid used the strip option this time, are indeed smaller

clsid
23rd December 2006, 13:45
Thanks.

cc979
2nd February 2007, 21:04
just built gcc-build-4.1.2-121479 if anyone wants

http://www.mytempdir.com/1199083

let me know, if anything wrong

cc979
7th February 2007, 14:32
https://sourceforge.net/project/showfiles.php?group_id=2435

The 2.17.50-200700129-1 snapshot incorporates modifications to official
binutils CVS since last update. In addition it patches windres to allow
use of spaces in filenames,

cc979
8th February 2007, 22:26
mingw-gcc-4.0.4

c:/mingw version
http://www.mytempdir.com/1208832
http://www.speedyshare.com/767136953.html
md5: D8CE3805F8DDB7B3DA729A4A63B5BEA3

d:/mingw version
http://www.mytempdir.com/1208847
http://www.speedyshare.com/330144904.html
md5: BD4D52DC4FF6B282DF50BB54ABF5C2F3

cc979
13th February 2007, 01:56
new builds up, patched

compiles ffdshow now

for drive c
http://www.mytempdir.com/1213589
md5: 8C04506F796B48F09F445A2F789038A5

for drive d
http://www.mytempdir.com/1213600
md5: 419A32AFF886AE1E016C48ABDBB86D5A

cc979
13th February 2007, 14:15
out of curiosity, is there any other paths that mingw users install to ?

eLupus
14th February 2007, 20:12
just wondering, howcome you need different builds for different paths?

cc979
15th February 2007, 14:25
just wondering, howcome you need different builds for different paths?

I think it's a problem with msys or gcc, on linux (doing a cross-compile) using a --prefix=/mingw would hardcode the search path into the compiler /mingw but in msys (windows) the hardcoded path would be /c/mingw or /d/mingw

i really should start doing cross-compiles

eLupus
15th February 2007, 18:05
odd that :)

cc979
17th February 2007, 01:20
as gcc 4.1.2 has been released officially, it is not patched to fix the 'alias thunk' error - hence it will not compile baseclasses in ffdshow

_xxl
17th February 2007, 09:15
When mingw gcc 4.x.x can compile SSE2 then it is really an important update for me.

cc979
19th February 2007, 22:57
new builds of gcc-4.1.3 svn

at http://cc979.uk.googlepages.com/home

Yong
20th February 2007, 22:40
tried your gcc 4.1.3, compiling ffdshow was fine,
but still create broken ffdshow.ax.
4.0.3/4.0.4 work fine for me, thx ;)

cc979
21st February 2007, 02:02
tried your gcc 4.1.3, compiling ffdshow was fine,
but still create broken ffdshow.ax.
4.0.3/4.0.4 work fine for me, thx ;)

i did get ffdshow.ax compiled by removing '-march=pentium-mmx -mtune=i686' from the makefiles but it has worked with last few builds

maybe it is a gcc problem with -march and -mtune

if you have any luck let me know, cheers

kneep
26th February 2007, 11:33
How to remove all the '-g' flags when compiling?
Seems not work by setting CFLAGS='-O2' CXXFLAGS='-O2'

cc979
26th February 2007, 18:12
How to remove all the '-g' flags when compiling?
Seems not work by setting CFLAGS='-O2' CXXFLAGS='-O2'

have a look at manual 3.9 (page 53)

tells you all about it

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc.pdf

or for other formats
http://gcc.gnu.org/onlinedocs/

you can look here for bugs and other gcc stuff
http://www.nabble.com/gcc-f1154.html

cheers

kneep
27th February 2007, 02:35
have a look at manual 3.9 (page 53)

tells you all about it

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc.pdf

or for other formats
http://gcc.gnu.org/onlinedocs/

you can look here for bugs and other gcc stuff
http://www.nabble.com/gcc-f1154.html

cheers
Thanks.
I've read the manual.
So you suggest not remove it because it facilitates bug reporting?

cc979
27th February 2007, 05:25
Thanks.
I've read the manual.
So you suggest not remove it because it facilitates bug reporting?

if you are sure there no bugs in your compiles, it should be ok

removing the -g can be done with

--disable-debug

or

-g0 (zero not o)

or

--enable-debug=no

or

DEBUG_FLAGS=-g0 (zero not o)

so i have read, let me know how it goes - i've not had the need to remove the -g yet

cheers

morph166955
28th February 2007, 18:40
i just wanted to say thanks for this little guide. i successfully compiled gcc 4.1.2 on my msys box (took a little bit of work getting some of the dependancys and loaded properly but i did!). im currently attempting to get gcc 4.2 and 4.3 working. gcc 4.2 compiles with only --enable-languages=c (c++ crashes on a bad header, im trying a new svn update now to see if that fixes it). and gcc 4.3 has other issues but thats to be expected. before anyone says "why use gcc 4.3" my answer is simple, i have a core2 and i want to make my programs optimized for the core2 (like mplayer and such) so that they are able to use the new instructions in the chip as well as SSSE3 (i think thats the right # of s's) and gcc 4.3 is the only version with core2 in it.

once i get this thing all said and done i may make a tgz of the dependancys that i built and had to find to get this thing to work right so people dont have to spend the 6-8 hours hunting them down and fighting with them to compile properly...but ill cross that bridge when i come to it. if anyone is doing this NOW and wants them i suspose i could do it so PM me if you are in need ill see what i can do.

THANKS AGAIN!

cc979
1st March 2007, 00:39
yeah i had to find the right combinations of files and configs to get anything working - gcc 4.2 & 4.3 - were working then get updated then broke but thats the way thing goes

glad my guide was of help, but if anything could be made more clear let me know

cheers

morph166955
1st March 2007, 01:05
well i succesfully got 4.2 working on an svn update from earlier today on both c & c++ so that was nice. im now trying to tweak it a little to be more optimized so that it runs faster and all that jazz.

4.3 is however being stuborn still...im getting an issue dealing with .dep files in the i686-pc-mingw32/libgcc folder (see the snip below). its the same issue ive been having with it for the past few days. not really sure why i get that error and ive only found vague references to other people having issues with it however no fixes that i can find. what would be real cool is if someone could give me a date/revision of a working version of gcc 4.3 that i can try to see if its my msys/mingw setup or if its the code itself. i found a version online from 20061204 which im going to try to get out of the svn and use.

just outa curioisity...to speed up my compile time when doing test builds of 4.3, if i dont use CFLAGS=-O2 when i run make, that would just give me a version thats not really optimized right? I figured with out doing optimization on the files it would probably compile faster for me.

thanks again.


make[3]: Entering directory `/home/Administrator/build-gcc-4.3.0/i686-pc-mingw32/libgcc'
__gcc_bcmp.dep:1 ***multiple target patterns. Stop.
make[3]: Leaving directory `/home/Administrator/build-gcc-4.3.0/i686-pc-mingw32/libgcc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/Administrator/build-gcc-4.3.0/i686-pc-mingw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/Administrator/build-gcc-4.3.0/'
make: *** [all] Error 2

Yong
1st March 2007, 02:15
i did get ffdshow.ax compiled by removing '-march=pentium-mmx -mtune=i686' from the makefiles but it has worked with last few builds

maybe it is a gcc problem with -march and -mtune

if you have any luck let me know, cheers
just tried compile ffdshow.ax without -mtune -march options, still no luck :p

morph166955
1st March 2007, 19:39
ok so i just got gcc 4.3 to work only with C enabled and then it occured to me...im not really doing anything that uses c++ (mplayer, xvid, x264 primarily) so would it be a bad thing to install gcc 4.3 for my c only stuff and just leave the c++ stuff to the 4.2 thats already installed?

cc979
1st March 2007, 21:36
well i succesfully got 4.2 working on an svn update from earlier today on both c & c++ so that was nice. im now trying to tweak it a little to be more optimized so that it runs faster and all that jazz.

did you patch your gcc 4.2 to fix alias thunk problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067

regarding gcc 4.3 did you update to the latest binutils - with patched winres?

hope devs include the patch in 4.2 & 4.3 has they did not with gcc 4.1.2

i'll dig a bit further to see whats up, cheers

cc979
1st March 2007, 21:39
just tried compile ffdshow.ax without -mtune -march options, still no luck :p

snap - just tried again, think i'll revert to an previous svn try and debug it

cheers

morph166955
2nd March 2007, 02:39
i did not do any patches at all. i compiled 4.2 successfully from yesterdays svn with:

../gcc-4.2.0/configure -v --enable-optimize --enable-languages=c,c++ --prefix=/mingw \
--enable-threads --oldincludedir=/mingw/include --disable-shared \
--with-cpu=prescott --with-arch=prescott --with-tune=prescott \
--with-ld=/mingw/bin/ld.exe --with-as=/mingw/bin/as.exe --disable-checking \
--without-x --disable-win32-registry --disable-nls --disable-werror --disable-libssp

make "CFLAGS=-O3 -march=prescott -mtune=prescott -msse -msse2 -msse3 -mmmx" "LDFLAGS=-s"


i realize the make line is a little excessive and probably unnecessary with the sse stuff but i figured it couldnt hurt. i was shooting for the most optimized and fastest compiler i could get and i figured that telling it to compile with the extra instruction sets put in would be nice (i wasnt looking to distribute this to anyone else and im only using it on this system).

as for 4.3, the snapshot from back in december works with out any problems. the current svn doesnt work. i think the reason why is because they moved things around and created a libgcc folder which is whats causing my problem (atleast one of them). i think something is screwed up with the way they do the dependancys for it creating the .dep files and not deleting them.

what im probably going to do is see the exact point they did that move and then try to get an svn of the version right before it (maybe ill go back a few from that just to be safe) and see if it works. wish me luck, ill let ya know how it goes.

morph166955
2nd March 2007, 02:56
sorry missed your point bout binutils...i pulled an svn down like 3 days ago and successfully built and installed that so i believe that should be good (unless the patch is something i have to add on top of that). afaik binutils has things like ar and ld, so below are my version info on those. im rebuilding/installing them from the most current svn now just incase althoguh i doubt it will do anything for me.

GNU ld version 2.17.50 20070228
GNU ar 2.17.50 20070228

cc979
2nd March 2007, 03:49
sorry missed your point bout binutils...i pulled an svn down like 3 days ago and successfully built and installed that so i believe that should be good (unless the patch is something i have to add on top of that). afaik binutils has things like ar and ld, so below are my version info on those. im rebuilding/installing them from the most current svn now just incase althoguh i doubt it will do anything for me.

GNU ld version 2.17.50 20070228
GNU ar 2.17.50 20070228

mingw binutils was patched to handle spaces in filenames, the link is on page1

the gcc 4.2 patch i was talking about fixes a problem about 'thunk alias's' - it was working in gcc 4.0 branch put they broke or changed something in gcc 4.2 and gcc 4.3 - so you might have problems compiling somethings

looking at your config sames like you can't it any faster, maybe if you use profiledbootstrap (but thats a different ball game - should be docs floating around about it)

you could re-compile gcc 4.2 with 'make bootstrap' just to check for errors

cheers

morph166955
2nd March 2007, 04:18
ill test the mingw binutils but if memory serves i used that before building my own and i had the same issue. thanks

morph166955
2nd March 2007, 09:00
its officially 3am but i just thought id post this up for now...ill explain tomorrow morning when I am consious


$ gcc --version
gcc.exe (GCC) 4.3.0 20070301 (experimental)


thats off of the current svn btw. the ONLY change I had to make was to add "rm -f *.dep" to libgcc/Makefile.in immeadiately above the make line i believe it was under the "all" category. ill make a diff tomorrow and upload it...that is a fully optimized version of gcc btw...and i got both c and c++ to compile. im considering trying to make java work too so that I can do some of my java work also on it, but thats for later. my next task, getting mplayer working on this again but this time im going to have all of my libraries optimized for core2/ssse3...

morph166955
2nd March 2007, 19:22
so interesting quirk. mplayer wont compile at -O0 or -O4 but does on -O1

i get an "'asm' operand has impossible constraint" error with libavcodec/i386/dsputil_mmx.c on line 636 (that matches the first asm volatile call in static inline void transpose4x4). my quick searching on google shows that this could be a gcc 4.2/4.3 error however i also found something on the gcc buglist about a similar file/problem from oct 2006 (h264.c http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440) and this is exhibiting identical signs. any advice?

EDIT: so yea...seems that it works...sometimes. its kinda weird...ive run it now twice at -O4 with no changes to the system at all and it worked once and failed once...im doing more runs with different options on the gcc line to see what caused the failure...

EDIT2: ok ignore the whole thing bout -O what ever...it was crashing only when using "-march=core2 -mtune=core2" however i tested it on prescott and that worked...im looking more into it. im thinking the way i built/optimized 4.3 may have had something to do with it so im making another build now that is completely unoptimized to double check.

cc979
3rd March 2007, 01:16
so interesting quirk. mplayer wont compile at -O0 or -O4 but does on -O1

i get an "'asm' operand has impossible constraint" error with libavcodec/i386/dsputil_mmx.c on line 636 (that matches the first asm volatile call in static inline void transpose4x4). my quick searching on google shows that this could be a gcc 4.2/4.3 error however i also found something on the gcc buglist about a similar file/problem from oct 2006 (h264.c http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440) and this is exhibiting identical signs. any advice?

EDIT: so yea...seems that it works...sometimes. its kinda weird...ive run it now twice at -O4 with no changes to the system at all and it worked once and failed once...im doing more runs with different options on the gcc line to see what caused the failure...

EDIT2: ok ignore the whole thing bout -O what ever...it was crashing only when using "-march=core2 -mtune=core2" however i tested it on prescott and that worked...im looking more into it. im thinking the way i built/optimized 4.3 may have had something to do with it so im making another build now that is completely unoptimized to double check.

if you use 'make bootstrap' it should tell if you have errors
also there's 'make check' but you need some others files, i think dejagnu

i've just trying to do a cross-compile with linux - not had much look yet

cheers

morph166955
3rd March 2007, 01:56
ive run make bootstrap and it works also. im attempting a cygwin cross-compile now (im still at the stage that im compiling/loading gmp,bison, etc). i can get 4.3 to compile and work when its in "prescott mode" its just agrivating that i cant get libavcodec to compile with core2 set.

the other issue im still having (and i loaded the binutils from sf.net already as well as my own) is that when gcc is run with -MM i still get output that has C:/msys... in it. the colon is whats causing my problem cause for some reason it isnt converting that to /c/msys and im not sure how to force that to do it. im kinda stumped on that one and i think if i fixed that then things would be much easier in this build for me.