From: <dan...@us...> - 2009-06-02 19:15:57
|
Revision: 1332 http://cegcc.svn.sourceforge.net/cegcc/?rev=1332&view=rev Author: dannybackx Date: 2009-06-02 19:15:55 +0000 (Tue, 02 Jun 2009) Log Message: ----------- Inspired on Dave Korn's comments : fix libgcc DLL support. Modified Paths: -------------- trunk/cegcc/src/gcc-4.4.0/ChangeLog.ce trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/mingw32.h trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/wince-cegcc.h trunk/cegcc/src/gcc-4.4.0/gcc/config/i386/mingw32ce.h Modified: trunk/cegcc/src/gcc-4.4.0/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc-4.4.0/ChangeLog.ce 2009-06-01 15:48:44 UTC (rev 1331) +++ trunk/cegcc/src/gcc-4.4.0/ChangeLog.ce 2009-06-02 19:15:55 UTC (rev 1332) @@ -1,3 +1,11 @@ +2009-06-02 Danny Backx <dan...@us...> + + * gcc/config/i386/mingw32ce.h, gcc/config/arm/wince-cegcc.h, + gcc/config/arm/mingw32.h (LIBGCC_SPEC) : Remove, replace by + * gcc/config/i386/mingw32ce.h, gcc/config/arm/wince-cegcc.h, + gcc/config/arm/mingw32.h (SHARED_LIBGCC_SPEC, REAL_LIBGCC_SPEC) : New + macros that support the shared libgcc. + 2009-05-30 Danny Backx <dan...@us...> * gcc/config/i386/mingw32ce.h : Use _DllMainCRTStartup with underscore. Modified: trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/mingw32.h =================================================================== --- trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/mingw32.h 2009-06-01 15:48:44 UTC (rev 1331) +++ trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/mingw32.h 2009-06-02 19:15:55 UTC (rev 1332) @@ -47,11 +47,6 @@ %{static:-Bstatic} %{!static:-Bdynamic} \ %{shared|mdll: -e DllMainCRTStartup}" -/* Include in the mingw32 libraries with libgcc */ -#undef LIBGCC_SPEC -#define LIBGCC_SPEC \ - "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lceoldname -lmingwex -lcoredll" - #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{shared|mdll:dllcrt3%O%s} \ %{!shared:%{!mdll:crt3%O%s}} %{pg:gcrt3%O%s}" @@ -91,3 +86,40 @@ \ putc ('\"', asm_file); \ } while (0) + +/* + * See the message from Dave Korn dated 2009/06/01 15:44 on the cegcc mailing + * list, and the gcc ChangeLog entry dated 2009-01-21, also by Dave. + * + * Based on that, we're replacing LIBGCC_SPEC by SHARED_LIBGCC_SPEC and + * REAL_GCC_SPEC. This is based on cygwin's definition, which we extend + * with the other libraries we need. + * + * The old definition : + "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lceoldname -lmingwex -lcoredll" + * + */ +#undef LIBGCC_SPEC + +#undef SHARED_LIBGCC_SPEC +#ifdef ENABLE_SHARED_LIBGCC +#define SHARED_LIBGCC_SPEC " \ + %{mthreads:-lmingwthrd} -lmingw32 \ + %{static|static-libgcc:-lgcc -lgcc_eh} \ + %{!static: \ + %{!static-libgcc: \ + %{!shared: \ + %{!shared-libgcc:-lgcc -lgcc_eh} \ + %{shared-libgcc:-lgcc_s -lgcc} \ + } \ + %{shared:-lgcc_s -lgcc} \ + } \ + } \ + -lceoldname -lmingwex -lcoredll" +#else +#define SHARED_LIBGCC_SPEC \ + "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lceoldname -lmingwex -lcoredll" +#endif + +#undef REAL_LIBGCC_SPEC +#define REAL_LIBGCC_SPEC SHARED_LIBGCC_SPEC Modified: trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/wince-cegcc.h =================================================================== --- trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/wince-cegcc.h 2009-06-01 15:48:44 UTC (rev 1331) +++ trunk/cegcc/src/gcc-4.4.0/gcc/config/arm/wince-cegcc.h 2009-06-02 19:15:55 UTC (rev 1332) @@ -43,10 +43,6 @@ %{pg: gcrt3%O%s} \ " -#undef LIBGCC_SPEC -#define LIBGCC_SPEC \ - "%{mthreads:-lcegccthrd} %{!static: -lcegcc } -lgcc" - /* We have to dynamic link to get to the system DLLs. All of libc, libm, the Unix stuff is in cegcc.dll. The import library is called 'libcegcc.dll.a'. For Windows applications, include more libraries, but @@ -65,3 +61,39 @@ %{static:-Bstatic} %{!static:-Bdynamic} \ %{shared|mdll: -e DllMainCRTStartup} \ " + + +/* + * See the message from Dave Korn dated 2009/06/01 15:44 on the cegcc mailing + * list, and the gcc ChangeLog entry dated 2009-01-21, also by Dave. + * + * Based on that, we're replacing LIBGCC_SPEC by SHARED_LIBGCC_SPEC and + * REAL_GCC_SPEC. This is based on cygwin's definition, which we extend + * with the other libraries we need. + * + * The old definition : + * "%{mthreads:-lcegccthrd} %{!static: -lcegcc } -lgcc" + */ +#undef LIBGCC_SPEC + +#undef SHARED_LIBGCC_SPEC +#ifdef ENABLE_SHARED_LIBGCC +#define SHARED_LIBGCC_SPEC " \ + %{mthreads:-lcegccthrd} \ + %{!static: -lcegcc } \ + %{static|static-libgcc:-lgcc -lgcc_eh} \ + %{!static: \ + %{!static-libgcc: \ + %{!shared: \ + %{!shared-libgcc:-lgcc -lgcc_eh} \ + %{shared-libgcc:-lgcc_s -lgcc} \ + } \ + %{shared:-lgcc_s -lgcc} \ + } \ + } " +#else +#define SHARED_LIBGCC_SPEC "%{mthreads:-lcegccthrd} %{!static: -lcegcc } -lgcc" +#endif + +#undef REAL_LIBGCC_SPEC +#define REAL_LIBGCC_SPEC SHARED_LIBGCC_SPEC Modified: trunk/cegcc/src/gcc-4.4.0/gcc/config/i386/mingw32ce.h =================================================================== --- trunk/cegcc/src/gcc-4.4.0/gcc/config/i386/mingw32ce.h 2009-06-01 15:48:44 UTC (rev 1331) +++ trunk/cegcc/src/gcc-4.4.0/gcc/config/i386/mingw32ce.h 2009-06-02 19:15:55 UTC (rev 1332) @@ -95,11 +95,6 @@ %{!shared:%{!mdll:crt3%O%s}} %{pg:gcrt3%O%s}" -/* Include in the mingw32 libraries with libgcc */ -#undef LIBGCC_SPEC -#define LIBGCC_SPEC \ - "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lceoldname -lmingwex" - /* One entry from cygming.h, the other one is cegcc exception handling */ #ifdef SUBTARGET_ATTRIBUTE_TABLE #undef SUBTARGET_ATTRIBUTE_TABLE @@ -172,3 +167,39 @@ #undef SHLIB_LC #define SHLIB_LC "-lmingw32 -lmingwex -lmsvcrt" + +/* + * See the message from Dave Korn dated 2009/06/01 15:44 on the cegcc mailing + * list, and the gcc ChangeLog entry dated 2009-01-21, also by Dave. + * + * Based on that, we're replacing LIBGCC_SPEC by SHARED_LIBGCC_SPEC and + * REAL_GCC_SPEC. This is based on cygwin's definition, which we extend + * with the other libraries we need (our list was -lmingw32 -lgcc -lceoldname + * -lmingwex prior to this). + * + * The REAL_LIBGCC_SPEC only contained support for the -mno-cygwin flag, + * which is why there's no difference with SHARED_LIBGCC_SPEC here. + */ +#undef LIBGCC_SPEC + +#undef SHARED_LIBGCC_SPEC +#ifdef ENABLE_SHARED_LIBGCC +#define SHARED_LIBGCC_SPEC " \ + %{mthreads:-lmingwthrd} -lmingw32 \ + %{static|static-libgcc:-lgcc -lgcc_eh} \ + %{!static: \ + %{!static-libgcc: \ + %{!shared: \ + %{!shared-libgcc:-lgcc -lgcc_eh} \ + %{shared-libgcc:-lgcc_s -lgcc} \ + } \ + %{shared:-lgcc_s -lgcc} \ + } \ + } \ + -lceoldname -lmingwex" +#else +#define SHARED_LIBGCC_SPEC " -lmingw32 -lgcc -lceoldname -lmingwex " +#endif + +#undef REAL_LIBGCC_SPEC +#define REAL_LIBGCC_SPEC SHARED_LIBGCC_SPEC This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |