Re: [wwwdocs] Two more broken links in readings.html

2013-03-30 Thread minux
Hi,

the link for "CompactRISC CR16CP Architecture" on that page is also broken.
As TI says document for CR16 is only available to existing customers, i'm
afraid we have to remove that link.


Re: [PATCH] build: add -Wl,-rpath=path to $gmplibs (issue 7124057)

2013-01-17 Thread minux
On Fri, Jan 18, 2013 at 3:39 AM, Mike Stump  wrote:
> On Jan 17, 2013, at 11:11 AM, minux...@gmail.com wrote:
>> some systems (notably NetBSD), doesn't place the path where libgmp,
>
> I think gcc should try and build and run a gmp program and fail to configure 
> if the binary can't also run.  This prevents configuring and building on such 
> a system.  The gcc directions for building gmp and friends should say that 
> they must be configured and built with --disable-shared --enable-static if 
> the user doesn't have the installed lib directory in their environment.

any opinions on this? this is very easy to implement with AC_TRY_RUN and
at least it will make the problem turn up early instead of when it's about to
configure libgcc (with the confusing error "gcc not able to compile").
of course, i will exclude the case when we're cross compiling gcc.

I'm happy to leave the problem of setting -rpath to pkgsrc maintainers
as I just want to do a full gcc bootstrap to test another libgcc patch.


Re: [PATCH] gcc/go/gospec.c: fix static linking of Go programs (issue 7130047)

2013-01-16 Thread minux . ma

Reviewers: iant,

Message:
please take another look.

Description:
2013-01-16  Shenghou Ma  

 * gospec.c: pass -u pthread_create to linker when static linking.



Please review this at https://codereview.appspot.com/7130047/

Affected files:
  M gcc/go/gospec.c


Index: gcc/go/gospec.c
===
--- gcc/go/gospec.c (revision 195240)
+++ gcc/go/gospec.c (working copy)
@@ -227,7 +227,7 @@
 #endif

   /* Make sure to have room for the trailing NULL argument.  */
-  num_args = argc + need_math + shared_libgcc + (library > 0) * 5 + 5;
+  num_args = argc + need_math + shared_libgcc + (library > 0) * 5 + 10;
   new_decoded_options = XNEWVEC (struct cl_decoded_option, num_args);

   i = 0;
@@ -381,6 +381,20 @@
 generate_option (OPT_shared_libgcc, NULL, 1, CL_DRIVER,
 &new_decoded_options[j++]);

+#ifdef TARGET_CAN_SPLIT_STACK
+  /* libgcc wraps pthread_create to support split stack, however, due to
+ relative ordering of -lpthread and -lgcc, we can't just mark
+ __real_pthread_create in libgcc as non-weak.  But we need to link in
+ pthread_create from pthread if we are statically linking, so we work-
+ around by passing -u pthread_create to to the linker. */
+  if (static_link)
+{
+  generate_option (OPT_Wl_, "-u,pthread_create", 1, CL_DRIVER,
+  &new_decoded_options[j]);
+  j++;
+}
+#endif
+
   *in_decoded_options_count = j;
   *in_decoded_options = new_decoded_options;
   *in_added_libraries = added_libraries;




[PATCH] gcc/doc: fix two typos (issue 7159043)

2013-01-17 Thread minux . ma

Reviewers: gerald_pfeifer.com, joseph_codesourcery.com,

Message:
two trivial typo fixes.

Description:
2013-01-16  Shenghou Ma  

* doc/invoke.texi: fix typo.
* doc/objc.texi: fix typo.


PS: my copyright assignment id is 782920.

Please review this at https://codereview.appspot.com/7159043/

Affected files:
  M gcc/doc/invoke.texi
  M gcc/doc/objc.texi


Index: gcc/doc/objc.texi
===
--- gcc/doc/objc.texi   (revision 195276)
+++ gcc/doc/objc.texi   (working copy)
@@ -1163,7 +1163,7 @@
 in dynamically registering the method.

 To configure the hook, you set the global variable
-@code{__objc_msg_foward2} to a function with the same argument and
+@code{__objc_msg_forward2} to a function with the same argument and
 return types of @code{objc_msg_lookup()}.  When
 @code{objc_msg_lookup()} can not find a method implementation, it
 invokes the hook function you provided to get a method implementation
Index: gcc/doc/invoke.texi
===
--- gcc/doc/invoke.texi (revision 195276)
+++ gcc/doc/invoke.texi (working copy)
@@ -12351,7 +12351,7 @@

 The subtype of the file created (like @samp{ppc7400} or @samp{ppc970} or
 @samp{i686}) is determined by the flags that specify the ISA
-that GCC is targetting, like @option{-mcpu} or @option{-march}.  The
+that GCC is targeting, like @option{-mcpu} or @option{-march}.  The
 @option{-force_cpusubtype_ALL} option can be used to override this.

 The Darwin tools vary in their behavior when presented with an ISA




[PATCH] build: add -Wl,-rpath=path to $gmplibs (issue 7124057)

2013-01-17 Thread minux . ma
Reviewers: bonzini_gnu.org, dj_redhat.com, neroden_gcc.gnu.org,  
aoliva_redhat.com, ralf.wildenhues_gmx.de,


Message:
some systems (notably NetBSD), doesn't place the path where libgmp,
libmpfr, libmpc resides into /etc/ld.so.conf, and instead rely on
the binary providing correct -rpath; this patch adds the required
-Wl,-rpath=path to $gmplibs so that when bootstrapping gcc,
the various language frontends (cc1, etc) could run in that case.

I assume all the linkers that gcc bootstraps with have support for
the -rpath flag.

Description:
2013-01-18  Shenghou Ma  

* configure.ac: add -Wl,-rpath=path to $gmplibs
* configure: Re-generate.


Please review this at https://codereview.appspot.com/7124057/

Affected files:
  M configure
  M configure.ac


Index: configure.ac
===
--- configure.ac(revision 195265)
+++ configure.ac(working copy)
@@ -1382,14 +1382,14 @@


 if test "x$with_gmp" != x; then
-  gmplibs="-L$with_gmp/lib $gmplibs"
+  gmplibs="-L$with_gmp/lib -Wl,-rpath=$with_gmp/lib $gmplibs"
   gmpinc="-I$with_gmp/include $gmpinc"
 fi
 if test "x$with_gmp_include" != x; then
   gmpinc="-I$with_gmp_include $gmpinc"
 fi
 if test "x$with_gmp_lib" != x; then
-  gmplibs="-L$with_gmp_lib $gmplibs"
+  gmplibs="-L$with_gmp_lib -Wl,-rpath=$with_gmp_lib $gmplibs"
 fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d  
${srcdir}/gmp; then

   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"
Index: configure
===
--- configure   (revision 195265)
+++ configure   (working copy)
@@ -5409,14 +5409,14 @@


 if test "x$with_gmp" != x; then
-  gmplibs="-L$with_gmp/lib $gmplibs"
+  gmplibs="-L$with_gmp/lib -Wl,-rpath=$with_gmp/lib $gmplibs"
   gmpinc="-I$with_gmp/include $gmpinc"
 fi
 if test "x$with_gmp_include" != x; then
   gmpinc="-I$with_gmp_include $gmpinc"
 fi
 if test "x$with_gmp_lib" != x; then
-  gmplibs="-L$with_gmp_lib $gmplibs"
+  gmplibs="-L$with_gmp_lib -Wl,-rpath=$with_gmp_lib $gmplibs"
 fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d  
${srcdir}/gmp; then

   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"




[PATCH] configure: don't echo $CFLAGS (issue 7103062)

2013-01-20 Thread minux . ma
Reviewers: bonzini_gnu.org, dj_redhat.com, neroden_gcc.gnu.org,  
aoliva_redhat.com, ralf.wildenhues_gmx.de, jakub_redhat.com,  
mikestump_comcast.net,


Description:
2013-01-20  Shenghou Ma  

* config/isl.m4: don't echo $CFLAGS for ISL_CHECK_VERSION.
* configure: Re-generate.


Please review this at https://codereview.appspot.com/7103062/

Affected files:
  M config/isl.m4
  M configure


Index: configure
===
--- configure   (revision 195313)
+++ configure   (working copy)
@@ -5833,7 +5833,6 @@
 CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
 LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
 LIBS="${_isl_saved_LIBS} -lisl"
-echo $CFLAGS

 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.10 of  
ISL" >&5

 $as_echo_n "checking for version 0.10 of ISL... " >&6; }
@@ -5882,7 +5881,6 @@
 CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
 LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
 LIBS="${_isl_saved_LIBS} -lisl"
-echo $CFLAGS

 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.11 of  
ISL" >&5

 $as_echo_n "checking for version 0.11 of ISL... " >&6; }
Index: config/isl.m4
===
--- config/isl.m4   (revision 195313)
+++ config/isl.m4   (working copy)
@@ -114,7 +114,6 @@
 CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
 LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
 LIBS="${_isl_saved_LIBS} -lisl"
-echo $CFLAGS

 AC_MSG_CHECKING([for version $1.$2 of ISL])
 AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],