Author Topic: TDM-GCC 4.5 series (Latest: 4.5.2 - 2011-03-27)  (Read 109914 times)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #45 on: June 17, 2010, 03:36:30 pm »
For wxWidgets, I added RCFLAGS to makefile.gcc per the attached patch and then added RCFLAGS="-F pe-i386" to the wxWidgets make command. This is the equivalent of "-m32" for windres, the resource compiler.

For Code::Blocks, there is no RCFLAGS equivalent so I had to use a custom build command for the .rc files: $rescomp -F pe-i386 -i $file -J rc -o $resource_output -O coff $res_includes

[attachment deleted by admin]
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #46 on: June 17, 2010, 07:28:52 pm »
Thanks, it works correctly now... both wx and C::B :)
There one issue remaining :
In the binutils bundled with the mingw64/multilib version, the strip utility doesn't accept wildcards but the mingw32 one does, which can be problematic when running the update.bat script... An easy workaround is of course to keep a copy of that 2nd strip.exe somewhere in the PATH, but not really elegant...  :?
« Last Edit: June 18, 2010, 01:26:53 pm by billyonthemountain »
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline sankarbose

  • Single posting newcomer
  • *
  • Posts: 4
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #47 on: June 17, 2010, 09:43:57 pm »
might explain why it works here my binutils where patched to allways use runtime-pseudo-reloc-v2 as default.

xerces examples work with that.
can you tell me how should i do it ??

Offline reckless

  • Regular
  • ***
  • Posts: 349
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #48 on: June 18, 2010, 07:02:34 am »
LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2".

the l is not a 1 (lowercase L) that one had me stomped for a while  :lol:
« Last Edit: June 18, 2010, 07:04:31 am by reckless »

Offline sankarbose

  • Single posting newcomer
  • *
  • Posts: 4
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #49 on: June 19, 2010, 08:01:20 am »
Hi reckless
thanks for the answer but i like to know where should i add the ld flag so that it uses the --enable-runtime-pseudo-reloc-v2 option all the time ?
 is it in the ldscripts files if yes where should i add the line ?
Quote
the l is not a 1 (lowercase L) that one had me stomped for a while  Laughing
Ha ha i had also quite a Time with this one. :lol:

Offline reckless

  • Regular
  • ***
  • Posts: 349
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #50 on: June 19, 2010, 08:57:15 am »
got the patch from here http://195.135.221.130/pub/opensuse/repositories/windows:/mingw:/win32/openSUSE_Factory/src/ you need to rebuild binutils with the patch in there binutils src rpm, but tbh its just as easy just doing LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2" ./configure --blah and you might run into problems with other stuff with runtime pseudo relocation allways on.
« Last Edit: June 19, 2010, 09:02:14 am by reckless »

Max

  • Guest
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #51 on: June 19, 2010, 05:13:27 pm »
I have two questions about the latest TDM GCC (4.5.0)

1) In the download page the 32 bit binutils is linked to the 2.20.1 version. The 64 bit version is linked to the latest 2.20.51 instead. Becasue the 2.20.51 is enable the pseudo-reloc-v2  by default I'm wondering why the 32 bit is still using the old one. Is there any reason for that?

2) I'm using the TDM-GCC 4.4.1 but I'm getting trouble throwing an exception from a thread and catching it in another thread. My understanding is that the exception mechanism is not thread safe in 4.4.1. Is this bug fixed in the 4.5.0 (that is really using TLS now). This bug is the only reason that is pushing me to upgrade. So I need to know if 4.5.0 has a a thread safe exception handling.

Thx

max

Offline reckless

  • Regular
  • ***
  • Posts: 349
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #52 on: June 19, 2010, 07:06:56 pm »
might just not have been updated yet, mingw64 is normally heaps and bounds ahead of normal mingw in implementing new tech.

and gcc-4.5.0 supports thread local storage, how stable it is i cant vote for though but it works ok here :)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #53 on: June 19, 2010, 09:54:21 pm »
1) In the download page the 32 bit binutils is linked to the 2.20.1 version. The 64 bit version is linked to the latest 2.20.51 instead. Becasue the 2.20.51 is enable the pseudo-reloc-v2  by default I'm wondering why the 32 bit is still using the old one. Is there any reason for that?
For the 32-bit edition I elect to provide only GCC's own binaries and use the MinGW project's official releases for the other packages. At the time that TDM-GCC 4.5.0 was released, the latest MinGW binutils release was 2.20.1. A newer version has since been released, and as soon as I'm convinced it has no severe regressions, I'll update the links and the installer.

Quote
2) I'm using the TDM-GCC 4.4.1 but I'm getting trouble throwing an exception from a thread and catching it in another thread. My understanding is that the exception mechanism is not thread safe in 4.4.1. Is this bug fixed in the 4.5.0 (that is really using TLS now). This bug is the only reason that is pushing me to upgrade. So I need to know if 4.5.0 has a a thread safe exception handling.
All recent TDM-GCC releases have been tested to work correctly throwing exceptions within threads, but trying to throw an exception in one thread and catch it in another is just asking for trouble, particularly as Windows has no concept of a true "joinable" thread. You should instead catch the exception in your thread function, convert it to heap memory if it isn't there already, and transfer it to your other thread via some synchronization function.
« Last Edit: June 19, 2010, 09:58:58 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline keke

  • Single posting newcomer
  • *
  • Posts: 3
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #54 on: June 21, 2010, 09:15:19 pm »
I'm trying to build TDM-GCC 4.5.0 32 bits from the sources using the provided makefile and scripts. I think I correctly followed the instructions but I'm stuck somewhere (during the compilation of the ppl lib I think). It says:

Code
/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2 -frounding-math -O2 -I/cr
ossdev/support-stage-tdm32/gmp/include -W -Wall  -version-info 8:0:1 -no-undefin
ed -s -L/crossdev/support-stage-tdm32/gmp/lib -o libppl.la -rpath /crossdev/supp
ort-stage-tdm32/ppl/lib Box.lo checked.lo Checked_Number.lo Float.lo fpu-ia32.lo
 Constraint.lo Constraint_System.lo Congruence.lo Congruence_System.lo Generator
_System.lo Grid_Generator_System.lo Generator.lo Grid_Generator.lo Init.lo Coeff
icient.lo Linear_Expression.lo Linear_System.lo Matrix.lo Scalar_Products.lo MIP
_Problem.lo Poly_Con_Relation.lo Poly_Gen_Relation.lo BHRZ03_Certificate.lo H79_
Certificate.lo Grid_Certificate.lo Polyhedron_nonpublic.lo Polyhedron_public.lo
Polyhedron_chdims.lo Polyhedron_widenings.lo C_Polyhedron.lo NNC_Polyhedron.lo G
rid_nonpublic.lo Grid_public.lo Grid_chdims.lo Grid_widenings.lo BD_Shape.lo Oct
agonal_Shape.lo Pointset_Powerset.lo Row.lo Linear_Row.lo Bit_Matrix.lo Bit_Row.
lo Ph_Status.lo Grid_Status.lo Variable.lo Variables_Set.lo conversion.lo minimi
ze.lo simplify.lo Grid_conversion.lo Grid_simplify.lo stdiobuf.lo c_streambuf.lo
 globals.lo mp_std_bits.lo version.lo    wrap.lo -lm -lgmpxx -lgmp
/bin/grep: /mingw/lib/gcc/mingw32/4.5.0/libstdc++.la: No such file or directory
/bin/sed: can't read /mingw/lib/gcc/mingw32/4.5.0/libstdc++.la: No such file or
directory
libtool: link: `/mingw/lib/gcc/mingw32/4.5.0/libstdc++.la' is not a valid libtoo
l archive
make[4]: *** [libppl.la] Error 1
make[4]: Leaving directory `/crossdev/build/ppl-tdm32/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/crossdev/build/ppl-tdm32/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/crossdev/build/ppl-tdm32'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/crossdev/build/ppl-tdm32'
make: *** [ppl] Error 2

I see it can't find libstdc++.la but according to the building instructions  (unless I didn't understand them correctly) provided in the TDM release, /mingw should be empty at this point. Then it's normal it can't find libstdc++.la in this path.

Any Idea?

Thanks
« Last Edit: June 21, 2010, 10:56:23 pm by keke »

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #55 on: June 21, 2010, 11:07:20 pm »
No, I've never seen that error before.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline keke

  • Single posting newcomer
  • *
  • Posts: 3
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #56 on: June 22, 2010, 12:52:23 pm »
@TDragon:

Is /mingw/lib/gcc/mingw32/4.5.0/libstdc++.la supposed to exist at this point of the building process or not?
If I understand the instructions correctly /mingw should be empty before I start the script.

Offline a14331990

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #57 on: June 22, 2010, 02:08:03 pm »
Is the patch auto-import.diff from dave korn (and slightly modified by me) already applied?
Have a look at here.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
This patch will enable auto-import by default in binutils and works well.
Best Regards.
a14331990 a.k.a Leo  

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #58 on: June 22, 2010, 08:05:59 pm »
It shouldn't matter whether or not there is a MinGW installation in /mingw when you build the dependencies. I've done it both ways myself. Again, I have no idea why you would be seeing that error.

To be clear, I have even less time to support building GCC from source than I have to support the use of the TDM-GCC binaries. Building non-Windows-specific software from source, particularly GCC, is *not* a straightforward process on Windows. It requires a lot of trial and error, stubbornness, and the willingness to dig as deeply as necessary into the sources to figure out the problem yourself. Don't expect much help from me.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #59 on: July 08, 2010, 02:07:46 pm »
Quote
cc1plus.exe: error: LTO support has not been enabled in this configuration
Any chance for that to happen in a future release, pretty please? :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."