Hi,

I have uploaded/am uploading a new build of my toolchain. Source is the same
(except for gcc, see below), there are some differences in the build steps:

 - The mingw-w64 crt, gdb and GNU make has been compiled with lto enabled. I
hope this solves the ld issue with falsely doubly defined symbols in
crtdll2.o while building gmp.
 - I have deleted the *.la files which were confusing craptools, and hope
libtool forgets about them too now.
 - With regards to this bug
report<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601>about the
results of this
patch <http://gcc.gnu.org/viewcvs?view=revision&revision=147799>, I did some
experimenting of my own; attached is a semi-reversal of the patch whiich
causes problems in vanilla GCC 4.5. I would like your thoughts on this,
because clearly GCC people need some of it for ARM ABI stuff (see link for
heated discussion). I have compiled wxWidgets 2.8.11 with and without my
patch applied, and my patch solves the size issue as far as I can see.
Please test this build Xavi, and see if there are any unforeseen problems.
Heck, My half-***ed patch might as well do nothing special... but I thought
it was worth a try. I tried to reform it so that only dllexport'd functions
are "emitted", and inline dllexprt'd functions are left alone (expected
behavior as I can make up from the bug report).
 - gcc, binutils, gdb are compiled with --disable-nls now because everyone
else does that.
 - gcc is compiled with --enable-fully-dynamic-string and
--disable-win32-registry (forgot those before :s)

Also, both the 32 and 64-bit build script is included, and in contrast to
the old one, these should work now. Put a 32-bit toolchain in the front of
PATH when using "buildmingw32.sh", and vice versa for 64-bit building.

Uploading now, will take another hour or so for it to complete. Let's hope
this one can reproduce itself :)

Ruben
diff -upr a/gcc/cp/decl2.c b/gcc/cp/decl2.c
--- a/gcc/cp/decl2.c	2010-03-23 22:29:53 +0000
+++ b/gcc/cp/decl2.c	2010-09-22 10:07:50 +0000
@@ -1783,8 +1783,11 @@ decl_needed_p (tree decl)
 	  && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
       return true;
   /* Functions marked "dllexport" must be emitted so that they are
-     visible to other DLLs.  */
-  if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
+     visible to other DLLs. Functions declared as "inline" will 
+     not be emitted (bug 43601), and be picked up by ld with
+     --enable-auto-import enabled by default. */
+  if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl))
+      && !DECL_DECLARED_INLINE_P (decl))
     return true;
   /* Otherwise, DECL does not need to be emitted -- yet.  A subsequent
      reference to DECL might cause it to be emitted later.  */
diff -upr a/gcc/cp/semantics.c b/gcc/cp/semantics.c
--- a/gcc/cp/semantics.c	2010-07-20 03:31:29 +0000
+++ b/gcc/cp/semantics.c	2010-09-22 10:11:20 +0000
@@ -3453,12 +3453,11 @@ expand_or_defer_fn_1 (tree fn)
 
       /* If the user wants us to keep all inline functions, then mark
 	 this function as needed so that finish_file will make sure to
-	 output it later.  Similarly, all dllexport'd functions must
-	 be emitted; there may be callers in other DLLs.  */
+	 output it later.  dllexport'd funcitons will be picked up by ld
+	 with --enable-auto-import enabled.  */
       if ((flag_keep_inline_functions
-	   && DECL_DECLARED_INLINE_P (fn)
-	   && !DECL_REALLY_EXTERN (fn))
-	  || lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn)))
+	       && DECL_DECLARED_INLINE_P (fn)
+	       && !DECL_REALLY_EXTERN (fn)))
 	mark_needed (fn);
     }
 
diff -upr a/gcc/testsuite/gcc.target/arm/neon/vst1s32.c b/gcc/testsuite/gcc.target/arm/neon/vst1s32.c
--- a/gcc/testsuite/gcc.target/arm/neon/vst1s32.c	2010-09-22 18:57:28 +0000
+++ b/gcc/testsuite/gcc.target/arm/neon/vst1s32.c	2007-07-25 12:28:31 +0000
@@ -0,0 +1,19 @@
+/* Test the `vst1s32' ARM Neon intrinsic.  */
+/* This file was autogenerated by neon-testgen.  */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-save-temps -O0 -mfpu=neon -mfloat-abi=softfp" } */
+
+#include "arm_neon.h"
+
+void test_vst1s32 (void)
+{
+  int32_t *arg0_int32_t;
+  int32x2_t arg1_int32x2_t;
+
+  vst1_s32 (arg0_int32_t, arg1_int32x2_t);
+}
+
+/* { dg-final { scan-assembler "vst1\.32\[ 	\]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\\\]!?\(\[ 	\...@\[a-za-z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff -upr a/gcc/tree.c b/gcc/tree.c
--- a/gcc/tree.c	2010-07-07 15:24:27 +0000
+++ b/gcc/tree.c	2010-09-22 10:02:50 +0000
@@ -5392,10 +5392,6 @@ handle_dll_attribute (tree * pnode, tree
       if (*no_add_attrs == false)
         DECL_DLLIMPORT_P (node) = 1;
     }
-  else if (TREE_CODE (node) == FUNCTION_DECL
-	   && DECL_DECLARED_INLINE_P (node))
-    /* An exported function, even if inline, must be emitted.  */
-    DECL_EXTERNAL (node) = 0;
 
   /*  Report error if symbol is not accessible at global scope.  */
   if (!TREE_PUBLIC (node)
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to