Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
On 06/26/14 02:18, Rainer Orth wrote: Ok for mainline? Could you please reformat the c_fix_arg's and test-text to be here strings a la: c_fix_arg = - _EOS_ #undef signbit #define signbit(x) (sizeof(x) == sizeof(float) \ \ ? __builtin_signbitf(x) \ \ : sizeof(x) == sizeof(long double) \ \? __builtin_signbitl(x) \ \: __builtin_signbit(x)); _EOS_; I changed the here string thingy to eat that tab-backslash and leave the rest of the tabs a few years ago. That is considerably more readable than: c_fix_arg = #undef\tsignbit\n #define\tsignbit(x)\t(sizeof(x) == sizeof(float) \\\n \t\t\t ? __builtin_signbitf(x) \\\n \t\t\t : sizeof(x) == sizeof(long double) \\\n \t\t\t ? __builtin_signbitl(x) \\\n \t\t\t : __builtin_signbit(x)); and the other two are worse. Thank you!
Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
Hi Rainer, On Tue, Jul 1, 2014 at 4:22 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: It's not yet in autogen 5.9: I've diffed the fixincl.x generated with my original patch and the amended one and those backslashes after the leading tab are still there. 5.9 is 7 years old now. However, I just looked up the change. I did it 2 years ago. It would mean bumping the requirement to 5.17.4, from a mere 1 year ago. I've now managed to build autogen 5.18.3 on Solaris 11, but still there Please send your managed to build stories. If they are not Guile related, I can try to clean 'em up. Building Guile is not for the feint of heart. is some trouble: with the following fix /* * Newer Solaris 10/11 GCC signbit implementations cause strict-aliasing * warnings. */ fix = { [...] }; the test passes (not ran a bootstrap yet). But I had to make two unexpected changes: * In the second c_fix_arg, all \t in charsets had to be replaced by literal TABs, otherwise they would occur as \\t in fixincl.x. I made the here string largely similar to the shell here doc, excepting there is no such thing as shell expansions (${var} stuff) and I (now) erase that backslash-before-whitespace thingy. * In test_text, I had to backslash-escape the trailing \, otherwise they were eaten up. Whether or not I do this makes no difference for the generated fixincl.x, but only with the escaping does make check pass. Right. It likely gets massaged by a shell script somewhere. I'd need to look up how test-text gets used in the template. I'm currently fighting to build autogen 5.18.3 and all its dependencies. Trouble is, if we do require a version newer than 5.5.4 as documented in install.texi, fixincludes make check will suddenly start to fail for those whose autogen version isn't recent enough. Every decade or so it ought to be possible to update by a few years. This is certainly something that needs to be decided: if we go this route, we should bump the autogen version requirement in install.texi (to whatever is necessary to support the TAB\ magic). I think Debian stable has moved up to 5.18.2, if I am remembering correctly. It's a year old (last fall). I think that is old enough to have been spread around by now. Thanks for looking into it. Regards, Bruce
Re: Remove obsolete Solaris 9 support
On 04/16/14 04:16, Rainer Orth wrote: I've already verified that trunk fails to build no sparc-sun-solaris2.9 and i386-pc-solaris2.9. Bootstraps on {i386,sparc}-*-solaris2.{10,11} (and x86_64-unknown-linux-gnu for good measure) are in progress. I'll verify that there are no unexpected fixincludes changes and differences in gcc configure results. fixincludes: * inclhack.def (math_exception): Bypass on *-*-solaris2.1[0-9]*. (solaris_int_types): Remove. (solaris_longjmp_noreturn): Remove. (solaris_mutex_init_2): Remove. (solaris_once_init_2): Remove. (solaris_sys_va_list): Remove. * fixincl.x: Regenerate. * tests/base/iso/setjmp_iso.h: Remove. * tests/base/pthread.h [SOLARIS_MUTEX_INIT_2_CHECK]: Remove. [SOLARIS_ONCE_INIT_2_CHECK]: Remove. * tests/base/sys/int_types.h: Remove. * tests/base/sys/va_list.h: Remove. Removing dinkleberry fixes by the platform maintainer always has my approval. :)
Re: configure check for flex
On 01/27/14 18:20, Hans-Peter Nilsson wrote: You'd need some additional conditions. There might be the additional issue that any lex is expected to work too, not just flex. It isn't committed 'cuz nobody said, Okay. I do wish either someone would say, Okay. or come up with something that works. I went to the effort to figure out where things got off the rails and did something that worked for me. Just saying, That won't work without a workable alternative is a bit irritating. There are surely plenty of opportunities around for irritatation! :) Dropped patches surely; I thought I was helpful there. Ungraceful errors from easily identifiable common gotchas definitely, so what you're trying to achieve is IMHO desirable. Patches hacking in something that just happened to work for someone too; I tried to stop that from happening. I spend my programming life either hacking at a startup or maintaining a few GNU tools I'm responsible for (e.g. fixincludes). This is outside of that realm, so I'm trying to produce enough of a patch that someone who knows how better than I do can finish it. I put my patch into the top level configure.ac file, not the gcc or libcpp ones. I suppose I could hack out the logic for setting is_release from those files, but really the crucial part is just having an intelligible error message that leads someone with a removed flex tool to a resolution of the issue. Someday maybe important tools won't disappear on you when you update your distribution, but barring that, the silent requirement for flex combined with an uninformative error message yields a booby trap. I hate booby traps.:) Cheers - Bruce $ svn diff configure.ac Index: configure.ac === --- configure.ac(revision 208044) +++ configure.ac(working copy) @@ -1319,10 +1319,17 @@ # Used for setting $lt_cv_objdir _LT_CHECK_OBJDIR -# Check for GMP, MPFR and MPC +# Check for flex, GMP, MPFR and MPC +[for p in flex +do + c=`command -v $p` + test -x $c || \ +]AC_MSG_ERROR([the $c command is required to build GCC])[ +done + gmplibs=-lmpc -lmpfr -lgmp gmpinc= -have_gmp=no +have_gmp=no] # Specify a location for mpc # check for this first so it ends up on the link line before mpfr.
Re: configure check for flex
In retrospect, it occurs to me that a am-i-ready-to-build.sh script in the contrib directory might be useful, too.
Re: [PATCH, fixincludes]: Add pthread.h to glibc_c99_inline_4 fix
On 10/21/14 02:30, Uros Bizjak wrote: 2014-10-21 Uros Bizjak ubiz...@gmail.com * inclhack.def (glibc_c99_inline_4): Add pthread.h to files. * fixincl.x: Regenerate. Bootstrapped and regression tested on CentOS 5.11 x86_64-linux-gnu {,-m32}. OK for mainline?
Re: [PATCH, fixincludes]: Add pthread.h to glibc_c99_inline_4 fix
On 10/25/14 10:40, Bruce Korb wrote: On 10/21/14 02:30, Uros Bizjak wrote: 2014-10-21 Uros Bizjak ubiz...@gmail.com * inclhack.def (glibc_c99_inline_4): Add pthread.h to files. * fixincl.x: Regenerate. Bootstrapped and regression tested on CentOS 5.11 x86_64-linux-gnu {,-m32}. OK for mainline? Interesting. I clicked send and my typing disappeared. Looks fine to me.
Re: fixincludes for libquadmath build regression
On 12/30/12 01:42, Paolo Bonzini wrote: Not my territory anymore, but it looks much better! CCing Bruce. Hi Alexandre, Long time. It's no wonder you've forgotten this little world! :) Anyway, please make the expressions more readable and strip out the generated text from the review message. Readability guidance: indent text and break lines logically. Consider here-strings. e.g. not: c_fix_arg = # ifdef __SSE_MATH__\n%0\n # else\n%1__asm__ __volatile__ (\fdiv st, st(0); fwait\\n %1\t\t\t: \=t\ (__f) : \0\ (__f));\n # endif; instead: c_fix_arg = # ifdef __SSE_MATH__\n%0\n # else\n %1__asm__ __volatile__ (\fdiv st, st(0); fwait\\n %1\t\t\t: \=t\ (__f) : \0\ (__f));\n # endif; or even better: c_fix_arg = - _EOText_ # ifdef __SSE_MATH__\n %0 # else %1__asm__ __volatile__ (fdiv st, st(0); fwait %1 =t (__f) : 0 (__f)); # endif _EOText_;
Re: fixincludes for libquadmath build regression
On 01/06/13 12:12, Alexandre Oliva wrote: On Dec 30, 2012, Bruce Korb bk...@gnu.org wrote: On 12/30/12 01:42, Paolo Bonzini wrote: Not my territory anymore, but it looks much better! CCing Bruce. Long time. It's no wonder you've forgotten this little world! :) Indeed! Anyway, please make the expressions more readable and strip out the generated text from the review message. Done. Ok? Looks good to me. Thanks!
Re: [committed] 2011 and 2012 Copyright year updates
On Mon, Jan 7, 2013 at 11:49 AM, Richard Sandiford rdsandif...@googlemail.com wrote: I think a patch for each directory will need posting separately for review of such things as whether any imported / generated files are mistakenly changed. So fixincludes/ separate from gcc/, and every library separate? OK. Separate? Seems pretty inextricably intertwined to me. Maybe I'm coming in too late in this conversation. I'll just update the copyrights in the next few days. It (fixincludes) has _certainly_ been updated every year of its existence. (Probably ought not count the original shell script, though I did lift all of its expressions) Cheers - Bruce
Re: [PATCH] Fix fixinclude common/non-common mix
Hi, On Mon, Jan 14, 2013 at 12:42 AM, Richard Biener rguent...@suse.de wrote: fixincludes mixes common declarations (in fixlib.h) and non-common decls (where they are defined) for verbose_level and fixinc_mode. XCode on Mountain Lion doesn't like this and its linker (rightfully) complains. It is not rightful that it complain, but it is rightful to accommodate it. approved.
Re: Ping: unreviewed copyright patches
On 02/03/13 02:19, Richard Sandiford wrote: Not exactly the most exciting patches, and certainly not worth more than one ping, but: fixincludes copyright http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00442.html You missed the file header. Why bother with dual update issues? --- mkheaders.in(revision 194742) +++ mkheaders.in(working copy) @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc. +# GCC Copyright (C) 2002-2013 Free Software Foundation, Inc. #This file is part of GCC. @@ -41,10 +41,9 @@ if [ x$1 = x--version ] ; then echo mkheaders (GCC) version $version -echo Copyright 2002, 2007, 2009 Free Software Foundation, Inc. -echo This program is free software; you may redistribute it under the -echo terms of the GNU General Public License. This program has -echo absolutely no warranty. +sed '\@http://www.gnu.org/licenses@q + \@/bin/sh@d + s/^#* *//' `which $0` exit 0 fi Alternatively (and probably better): --- mkheaders.in(revision 194742) +++ mkheaders.in(working copy) @@ -1,22 +1,22 @@ #!/bin/sh +copyright=' +GCC Copyright (C) 2002-2013 Free Software Foundation, Inc. -# Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc. +This file is part of GCC. -#This file is part of GCC. - -#GCC is free software; you can redistribute it and/or modify it under -#the terms of the GNU General Public License as published by the Free -#Software Foundation; either version 3, or (at your option) any later -#version. - -#GCC is distributed in the hope that it will be useful, but WITHOUT -#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -#for more details. - -#You should have received a copy of the GNU General Public License -#along with GCC; see the file COPYING3. If not see -#http://www.gnu.org/licenses/. +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +http://www.gnu.org/licenses/.' # Basic information target=@target@ @@ -41,10 +41,7 @@ if [ x$1 = x--version ] ; then echo mkheaders (GCC) version $version -echo Copyright 2002, 2007, 2009 Free Software Foundation, Inc. -echo This program is free software; you may redistribute it under the -echo terms of the GNU General Public License. This program has -echo absolutely no warranty. +echo $copyright exit 0 fi Either way === http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00443.html Is the project fixincludes, inclhack, gcc or unnamed? I think if you go to the trouble to clean all this up, one should be picked and it should be made consistent. :) Personally, I think GCC first, fixincludes second. Index: gcc/fixincludes/fixinc.in === --- gcc.orig/fixincludes/fixinc.in +++ gcc/fixincludes/fixinc.in @@ -6,8 +6,7 @@ # # See README-fixinc for more information. # -# fixincludes copyright (c) 1998, 1999, 2000, 2002, 2009 -# The Free Software Foundation, Inc. +# fixincludes copyright (C) 1998-2013 Free Software Foundation, Inc. # #
Re: Ping: unreviewed copyright patches
On 02/03/13 09:42, Richard Sandiford wrote: You missed the file header. That was deliberately in patch 2 though. OK. Why bother with dual update issues? Well, the point is that patch 2 is scripted. OK: echo $copyright | sed 's/(C) 2002-/(C) /' and now you print the right date and never have to hand update again. And if the notice gets changed because of a new and better address or whatever, just one place and not two. I hate hand updating mind numbing stuff like this. As you say: Believe me, I don't find copyright year lists vs. ranges any more interesting than the next man. This really was supposed to be an attempt to make things simpler. simpler as in trying to never have to think about it any more? :)
Re: Ping: unreviewed copyright patches
On Mon, Feb 4, 2013 at 11:55 AM, Ben Elliston b...@air.net.au wrote: On Mon, Feb 04, 2013 at 06:59:38PM +, Richard Sandiford wrote: These days the guideline encourage updating all files, even ones that haven't changed, so I was hoping we could do that gcc-wide. If that is what the guidelines say, then I will not object. I am just a bit surprised that you can claim copyright for a year in which the file is not modified. I've wondered about the policy for years, except that I didn't consider it very important. The thinking now aligns with what I always thought: the copyright year is based on the work as a whole. Each individual file is not individually copyrighted, any more than pages and chapters are individually copyrighted. Its the whole book. If you update a chapter, the book copyright date is updated. Makes more sense to me. My issue is likely my issue: too many names are used for the fixincludes copyright notices. Oh, well. Cheers -Bruce
Interlacing switch labels and compound statements
I stumbled over this code using a source code analyzer. It incorrectly assumed that switch labels cannot be inserted into random places inside of enclosed compound statements. It correctly assumes that you shouldn't be doing that. :) I propose making this change solely for aesthetics: static void pp_cxx_decl_specifier_seq (cxx_pretty_printer *pp, tree t) { switch (TREE_CODE (t)) { case FUNCTION_DECL: /* Constructors don't have return types. And conversion functions do not have a type-specifier in their return types. */ if (DECL_CONSTRUCTOR_P (t) || DECL_CONV_FN_P (t)) pp_cxx_function_specifier (pp, t); else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))); else default: pp_c_declaration_specifiers (pp_c_base (pp), t); break; } } This is, indeed, legal, but just because it is legal doesn't make it clear. Even if it were reasonable, wouldn't it be written thus? static void pp_cxx_decl_specifier_seq (cxx_pretty_printer *pp, tree t) { switch (TREE_CODE (t)) { case FUNCTION_DECL: /* Constructors don't have return types. And conversion functions do not have a type-specifier in their return types. */ if (DECL_CONSTRUCTOR_P (t) || DECL_CONV_FN_P (t)) pp_cxx_function_specifier (pp, t); else if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))); else default: pp_c_declaration_specifiers (pp_c_base (pp), t); break; } } Though I think this would be better: static void pp_cxx_decl_specifier_seq (cxx_pretty_printer *pp, tree t) { switch (TREE_CODE (t)) { case FUNCTION_DECL: /* Constructors don't have return types. And conversion functions do not have a type-specifier in their return types. */ if (DECL_CONSTRUCTOR_P (t) || DECL_CONV_FN_P (t)) pp_cxx_function_specifier (pp, t), break; if (DECL_NONSTATIC_MEMBER_FUNCTION_P (t)) pp_cxx_decl_specifier_seq (pp, TREE_TYPE (TREE_TYPE (t))), break; /* FALLTHROUGH */ default: pp_c_declaration_specifiers (pp_c_base (pp), t); break; } } It surely looks cleaner to my eyes..
Re: [vms] Use fix include on alpha-vms
Hi Tristan, On Thu, Sep 22, 2011 at 6:59 AM, Tristan Gingold ging...@adacore.com wrote: Hi, currently alpha-vms is listed as a particular target in fixincludes/mkfixinc.sh but ia64-vms isn't. As I will submit a patch to add some rules for both alpha and ia64 VMS, first fixincludes must be enabled on both. Committed on trunk. Are the current fixes working reasonably for VMS? If so, then approved. If not, then maybe defer the activation until it is working better? Thanks.
Re: [Patch]: New fixincludes fixes for vms
On 09/22/11 08:00, Tristan Gingold wrote: Hi, this patch adds some fixes in fixincludes specific to VMS. Until now we were using a manually modified subset of the VMS headers, but using fix includes is the right way. Ok for mainline ? Looks good to me. Please, thank you.
Re: [Fixinclude]: Fix typo and default to twoprocess on VMS
Hi Tristan, On Tue, Apr 17, 2012 at 5:57 AM, Tristan Gingold ging...@adacore.com wrote: Hi, one-process methodology cannot be used on VMS[...] But, when twoprocess is selected, gcc emits a warning[...] Ok for trunk ? diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index e7de791..f1fb2ff 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -53,7 +53,8 @@ fi], i?86-*-msdosdjgpp* | \ i?86-*-mingw32* | \ x86_64-*-mingw32* | \ - *-*-beos* ) + *-*-beos* | \ + *-*-*vms*) TARGET=twoprocess ;; This, definitely. diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c index 9f399ab..1133534 100644 --- a/fixincludes/fixincl.c +++ b/fixincludes/fixincl.c @@ -829,7 +829,7 @@ fix_with_system (tFixDesc* p_fixd, /* * Now add the fix number and file names that may be needed */ - sprintf (pz_scan, %ld '%s' '%s', (long) (p_fixd - fixDescList), + sprintf (pz_scan, %ld '%s' '%s' '%s', (long) (p_fixd - fixDescList), pz_fix_file, pz_file_source, pz_temp_file); } else /* NOT an internal fix: */ This, almost certainly. I'll take a peek at the source and convince myself of this decade old mistake tomorrow send my grateful thanks and approval then. (No access to source today.) Thank you! Cheers - Bruce
Re: [Fixinclude]: Fix typo and default to twoprocess on VMS
Hi, When I approved a patch in 2008, there was a typo. I didn't notice and it was fixed by removing a formatting element. Your patch corrects the error. Please apply your changes to active branches. Thank you! Regards, Bruce
Re: VxWorks Patches Back from the Dead!
On 08/22/12 17:05, rbmj wrote: Hello Everyone, I have ten patches which are approved or obvious but waiting on commit The include fixing stuff looks fine to me. However I think it might be simpler to tweak mkfixinc.sh to sed '/if test -s .{MACRO_LIST}/s/$/ false/' \ ${srcdir}/fixinc.in ${target} for vxworks rather than all that configury rigmarole. That would eliminate changes to gcc/configure.ac and gcc/Makefile.in. Basically degrading the entire first patch to this: $ svn diff mkfixinc.sh Index: mkfixinc.sh === 1 == '-u' 2 == '-L' 3 == 'mkfixinc.sh (revision 190448)' 4 == '-L' 5 == 'mkfixinc.sh (working copy)' 6 == '.svn/text-base/mkfixinc.sh.svn-base' 7 == 'mkfixinc.sh' --- mkfixinc.sh (revision 190448) +++ mkfixinc.sh (working copy) @@ -15,7 +15,6 @@ i?86-*-mingw32* | \ x86_64-*-mingw32* | \ i?86-*-interix* | \ -*-*-vxworks* | \ powerpc-*-eabisim* | \ powerpc-*-eabi*| \ powerpc-*-rtems* | \ @@ -26,6 +25,11 @@ (echo #! /bin/sh ; echo exit 0 ) ${target} ;; +*-*-vxworks* ) +sed '/if test -s .{MACRO_LIST}/s/$/ false/' \ +${srcdir}/fixinc.in ${target} +;; + *) cat ${srcdir}/fixinc.in ${target} || exit 1 ;;
Re: VxWorks Patches Back from the Dead!
On 08/24/12 11:50, rbmj wrote: On 8/22/2012 8:52 PM, Bruce Korb wrote: However I think it might be simpler to tweak mkfixinc.sh to sed '/if test -s .{MACRO_LIST}/s/$/ false/' \ ${srcdir}/fixinc.in ${target} for vxworks rather than all that configury rigmarole. That would eliminate changes to gcc/configure.ac and gcc/Makefile.in. OK. One question though: Why not just have a case statement inside fixinc.in? e.g. case ${target_canonical} in *-*-vxworks*) # Disable the machine name fix as it breaks things machine_name_override='OVERRIDE' ;; esac if test -s ${MACRO_LIST} test -z ${machine_name_override} There are many ways of accomplishing the same thing. I just thought of the fact that the mkfixinc.sh script constructed the result script either by spinning it from thin air or by copying a source file, so why not just edit that source file when it wasn't doing the right thing? Your solution is fine, too. You could also make the sed expression simpler: sed '/^if test -s .{MACRO_LIST}/s/if .*/if false/' sed '/^if test -s .{MACRO_LIST}/,/^fi/d' or replace ``machine_name_override='OVERRIDE'' with ``test -f ${MACRO_LIST} rm -f ${MACRO_LIST}'' I will approve any reasonably simple solution. :) Thank you for doing this, by the way! Regards, Bruce
Re: VxWorks Patches Back from the Dead!
Hi Robert, If you are going to defer, then: On Fri, Aug 24, 2012 at 1:20 PM, rbmj r...@verizon.net wrote: diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in index e73aed9..de7be35 100755 --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -128,6 +128,18 @@ fi # # # # # # # # # # # # # # # # # # # # # # +# Check to see if the machine_name fix needs to be disabled. +# + +case ${target_canonical} in +*-*-vxworks*) +machine_name_override=OVERRIDE replace this line with: test -f ${MACRO_LIST} rm -f ${MACRO_LIST} The remaining part of the patch to this file is not necessary. +;; +esac Yes, my earlier solution wasn't quite the simplest. Driving the screw with the proverbial golden hammer... Boy I'm glad I never do that... :( ') Cheers - Bruce
Re: VxWorks Patches Back from the Dead!
Hi Robert, On Thu, Aug 30, 2012 at 6:30 AM, rbmj r...@verizon.net wrote: Done, and patch is attached. OK. make install doesn't seem to like it as much as I do. It complains because it tries to install macro_list and can't find it. Proposed solutions: 2. Change line to read test -f ${MACRO_LIST} rm -f ${MACRO_LIST} touch ${MACRO_LIST} Advantages- Will not unnecessarily run machine_name. Saves 4 bytes of disk usage over option 1 :D Disadvantages- Looks rather hackish; something about it feels wrong Agreed. You would have to add a comment 1. Change line to read test -f ${MACRO_LIST} echo ${MACRO_LIST} Advantages- easy, simple Disadvantages- might cause an unnecessary run of the fix. A very, very small potential compile time hit. GCC compile time hit Anyway, this looks cleaner and I surely don't see much difference between this and #2 above. 3. Make macro_list optional for installation Disadvantages- more complex, and I don't really feel like going back into the makefiles again. That's a scary place. Amen. Keep it as simple as you can. Thanks.
Re: VxWorks Patches Back from the Dead!
On 09/09/12 08:54, rbmj wrote: Just because I *love* bothering everyone with emails... I don't mind, as long as you don't expect me to do anything until I'm certain you've stabilized the patch ;) I'm glad you rolled it up into one patch, because I was eventually going to ask you to do that. Thank you. Cheers - Bruce I've made a few changes and squashed everything into a single patch for ease of application. The commit message is inside the patch, but here's the suggested ChangeLog: configure.ac: add --enable-libstdcxx option configure: regenerate [gcc] gcov-io.c (gcov_open): Pass mode to open() unconditionally [fixincludes] fixinc.in: Added ability to skip machine_name inclhack.def (AAB_vxworks_assert): Added fix inclhack.def (AAB_vxworks_regs_vxtypes): Added fix inclhack.def (AAB_vxworks_stdint): Added fix inclhack.def (AAB_vxworks_unistd): Added fix inclhack.def (vxworks_ioctl_macro): Added fix inclhack.def (vxworks_mkdir_macro): Added fix inclhack.def (vxworks_regs): Added fix inclhack.def (vxworks_write_const): Added fix fixincl.x: Regenerate mkfixinc.sh: Removed vxworks from list of no-op fixinc targets [libstdc++-v3] config/os/vxworks/os_defines.h: #define'd NOMINMAX Thanks, Robert Mason
Re: VxWorks Patches Back from the Dead!
Hi, On Mon, Sep 10, 2012 at 10:48 AM, rbmj r...@verizon.net wrote: On the other hand, I've read this on the website: Don't mix together changes made for different reasons. Send them individually. Ideally, each change you send should be impossible to subdivide into parts that we might want to consider separately, because each of its parts gets its motivation from the other parts OTOH, this is a fairly cohesive set of patches. A single project. Even if, strictly speaking, each include fix is entirely separate from the others (by the design of fixincludes), I see them as a cohesive set that ought to be in a single commit. Fixes to fixes for fixincludes have been very infrequent. ... At the same time, it's a pain in the rear to worry about 12 different commits I'm into comforting one's derriere. Unless cosmic rays break everything again, that should be all. :) OK. I'll push it on your behalf once the other bits have been approved by their approvers. Cheers - Bruce
Re: [fixincludes] Fix posix_spawn* declarations in Solaris spawn.h (PR c++/49347)
On 07/25/11 08:17, Rainer Orth wrote: As discussed in the PR, the Solaris 10+spawn.h header needs a fix to make it work with g++. The following patch implements it. It passed a i386-pc-solaris2.11 bootstrap without regressions and make check in fixincludes works without failures. Ok for mainline? Hi Rainer, some-function(char *const argv[_RESTRICT_KYWD], ...) looks pretty broken to me. How would it work with plain gcc? Anyway, editing the _RESTRICT_KYWD into the correct place looks correct to me, and I'm sure you tested. Ship it. Methinks all active branches, too
Re: [PATCH] Fixincludes/VxWorks
On 06/06/12 09:33, rbmj wrote: Hi everyone, OK, I'm slow. I just woke up from a late night. test -r vxWorks.h is the mechanism to ensure that tests only fire on a vxworks platform. Seems a bit obscure, but if it is easier than other mechanisms, then fine. I do think a mach test would be much more straight forward: * mach - Match the output of config.guess against a series of fnmatch patterns. It must match at least one of the patterns, unless not-machine has also been specified. In that case, the config.guess output must not match any of the patterns. (from the README file) It would remove any need for relying on side effects in the test-text: test_text = `touch vxWorks.h` extern int write ( int , char * , size_t ) ;; There is no guarantee that that will work. It only works because in the construction of the test, the text gets passed through shell interpretation at some point. It is not required that that happen. To do what you want, you'd need to use this: test-text = `touch vxWorks.h echo extern int write ( int , char * , size_t ) ;`; and even then, it should be researched as to whether or not you need to prefix the touched file name with ${SRCDIR}/ because I don't remember. I still think: mach = *-*-vxworks*; is more straight forward, and you can then eliminate the touchy vxWorks.h thingy.
Re: Why is fixincludes not doing anything?
RE: http://gcc.gnu.org/ml/gcc-help/2012-05/msg00245.html perhaps it would be useful to echo a warning into the stderr stream when platforms get bypassed?
Re: [PATCH] Fixincludes/VxWorks
On Sun, Jun 10, 2012 at 10:57 AM, Nathan Sidwell nat...@acm.org wrote: On 06/06/12 17:33, rbmj wrote: Hi everyone, This patch series is the result of this [1] thread about fixincludes on VxWorks. It resolves bugs 53457 and 53378, and a few other issues that previously required manual intervention to fix for VxWorks header files. From a vxworks POV these all look ok. Oh, from fixincludes, too.
Re: [PATCH] AIX pthread.h fixincludes
Hi David, On Tue, Jun 19, 2012 at 7:16 AM, David Edelsohn dje@gmail.com wrote: Okay? Okay. Cheers - Bruce
Re: [Ping] Fix gcc/gcov.c and libgcc/libgcov.c to fix build on VxWorks
On 06/24/12 15:54, rbmj wrote: + c_fix_arg = %0\n + #ifdef IN_GCC\n + #define mkdir(dir, mode) ((mode), (mkdir)(dir))\n + #endif\n; + c_fix_arg = extern[\t ]+STATUS[\t ]+mkdir[\t ]* + \\([\t ]*const[\t ]+char[\t ]*\\*[\t ]* /* arg type */ + (|[_[:alpha:]][_[:alnum:]]*) /* arg name (optional) */ + \\)[\t ]*;; + + test_text = extern STATUS mkdir (const char * _qwerty) ;; How gross. Approved. :)
Re: [PATCH] AIX fixincludes for pthread.h
On Mon, Nov 7, 2011 at 12:59 PM, David Edelsohn dje@gmail.com wrote: Okay? Well, okay, but I'd prefer one fix something like the following (and I confess I've not had any test time...) because it looks simpler to me: /* * pthread.h on AIX defines PTHREAD_ONCE_INIT without enough braces. * Rewrite the define as a dual define with the original name now containing * the missing braces. */ fix = { hackname = aix_once_init; mach = *-*-aix*; files = pthread.h; select= (#define[ \t]+)(PTHREAD_ONCE_INIT)( \n \\{); c_fix = format; c_fix_arg = %1%2 { %2_INTERNAL }\n%1%2_INTERNAL%3; test_text = - _EOF_ #if FUMBLE #define PTHREAD_ONCE_INIT \ { \ ... _PTH_FLAGS_INIT64, \ } #else #define PTHREAD_ONCE_INIT \ { \ ... 2, \ } #endif _EOF_; };
Re: [PATCH] AIX fixincludes for pthread.h
Hi David, On Tue, Nov 8, 2011 at 10:20 AM, David Edelsohn dje@gmail.com wrote: Okay? Well, okay, but Also, there are other fixincludes fixes for missing braces that directly add the braces, not a wrapper. They are not multi-line macros, but there is a precedent on the style of solution. Like I said, okay, but Each entry is some sort of compromise. Each entry exacts a cost of operation. If inserting braces with a single fix is easy, I think that's the preferred solution. Using two fixes to insert a matched pair of braces just seems a bit dodgey. Especially given that the selection expression feels so non-specific, at least to me: [ \t]0 \n\\}\n In the final analysis, AIX is your play area and you know the trade-offs, so I leave it to you to decide. Cheers - Bruce
Re: [Patch] fixinclude: shell-quote testing file
Hi Tristan, On Mon, May 16, 2011 at 6:39 AM, Tristan Gingold ging...@adacore.com wrote: Sure. [If] The patch below is ok for 'make check', is it also ok for you ? Yes, thank you.
Re: [Patch] fixincludes: fix solaris_complex_cxx rule syntax
Hi Tristan, On Mon, May 16, 2011 at 8:27 AM, Tristan Gingold ging...@adacore.com wrote: Yes, it is ok on GNU/Linux and Solaris. Do I really need to test on HP/UX and AIX ? Won't be easy for me. Solaris and BSD are usually the most unusual, so I'd say go ahead for mainline and see if you get squawks. With several weeks of silence, I'd then be inclined to back port to the active branch(es) since it is actually a bug fix. (Which also leaves me wondering how it has worked up until now.)
Re: [fixincludes] Allow properly defining __cplusplus with Solaris headers (PR libstdc++-v3/1773)
On Tue, Aug 9, 2011 at 2:35 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: Ok for mainline (no point in backporting to release branches since this will never be used)? Hi Rainer, never be used? OK. Looks good to me. Cheers - Bruce
Re: Remove obsolete Tru64 UNIX V5.1B fixinclude support
On 03/05/12 09:01, Rainer Orth wrote: This is where I need explicit approval and/or guidance: * There are some fixincludes hacks that from their names seem to be osf-specific, but are not restricted to alpha*-dec-osf*. Bruce, what's the best way to handle those? Disable them e.g. with a mach clause like unused-alpha*-dec-osf* and see if anything else breaks? I think the right way is to require that all ports have a maintenance person build the thing at least once a year for all supported platforms. For such maintenance builds, I can trivially emit a list of hacks that got triggered during the build. Any hacks that don't show up in the list for a couple of years get marked as obsolete and trigger a build warning. If nobody complains about the warning, then its gone. Shouldn't take more than 3 or 4 years of disuse to get rid of the cruft. :) How's that for an approach? Cheers - Bruce
Re: Remove obsolete Tru64 UNIX V5.1B support
CF: fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. Seems reasonable to me...
Re: Remove obsolete Tru64 UNIX V5.1B support
On Mon, Mar 5, 2012 at 3:13 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Mon, 5 Mar 2012, Rainer Orth wrote: * There are some fixincludes hacks that from their names seem to be osf-specific, but are not restricted to alpha*-dec-osf*. Bruce, what's the best way to handle those? Disable them e.g. with a mach clause like unused-alpha*-dec-osf* and see if anything else breaks? I'd favour just removing any fixes that it seems likely are no longer useful. I favor it for now, but I think being more aggressive is a good thing. #define REGEX_COUNT 265 #define MACH_LIST_SIZE_LIMIT 181 #define FIX_COUNT223 I believe that headers have likely improved in the last decade. I do doubt that there are twice as many actively needed patches to headers required now versus then.
Re: [Patch]: Add include hacks for VMS headers
On Mon, Mar 12, 2012 at 3:05 AM, Tristan Gingold ging...@adacore.com wrote: Hi, this patch adds a few fix include entries for VMS so that: [things work] Looks good to me.
Re: Remove obsolete IRIX 6.5 support
On Mon, Mar 12, 2012 at 10:03 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: I'm happy with the stuff going away! :)
Re: [Patch]: Update fixincludes/README
I suppose after a decade of being gone, it's time to stop referencing it. OK for *ALL* active branches. On Wed, Mar 14, 2012 at 2:36 AM, Tristan Gingold ging...@adacore.com wrote: Hi, fixinc.sh is not anymore in gcc/ directory. So I propose to adjust fixincludes/README. Ok for trunk ? Tristan. fixincludes/ 2012-03-14 Tristan Gingold ging...@adacore.com * README (EXAMPLES OF FIXES): Update. diff --git a/fixincludes/README b/fixincludes/README index 07a3964..c7144a0 100644 --- a/fixincludes/README +++ b/fixincludes/README @@ -314,7 +314,7 @@ EXAMPLES OF FIXES: GCC. But you can also: cd ${top_builddir}/gcc - rm -rf fixinc.sh include/ stmp-fixinc + rm -rf include-fixed/ stmp-fixinc make stmp-fixinc I would really recommend, however:
Re: [fixincludes] Fix pthread.h failure (PR other/52626)
Hi Rainer, On Wed, Mar 21, 2012 at 9:25 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: As reported in PR other/52626, make check in fixincludes is currently failing since I neglected to adapt the baseline for the Solaris 8 removal ;-( I always meant to run make check, but forgot. On the other hand, it would be really helpful if fixincludes make check could emit DejaGnu-style fixincludes.{sum, log} files which would automatically be picked up by make mail-report.log and make failures immediately obvious. Patch welcome! I, myself, don't know what emit DejaGnu-style fixincludes.{sum, log} files would mean. The following patch fixes this, tested with make check in fixincludes on i386-pc-solaris2.11. Ok for mainline? I'm sure you examined the difference by hand and confirmed that the change is expected. Then yes, please, by all means. Thank you! - Bruce
Re: [fixincludes] Fix pthread.h failure (PR other/52626)
Rather simple... In a file called fixinclude.sum, put PASS: unique string or FAIL: unique string one per line, Bonus points if you can total passes and failures: I think you just put it into the check template so it creates the result. Since multiple fixes tweak the same file, there really isn't a way to figure out what has passed. You can only figure out what has failed. So, let's just call it one test. +fix_sum_fmt='%s: fixincludes + +# of expected passes1 +# of expected failures 0 +# of unexpected failures%s\n' Do I get the bonus points? :D Index: check.tpl === --- check.tpl (revision 184997) +++ check.tpl (working copy) @@ -25,7 +25,7 @@ rm -rf ${DESTDIR} ${SRCDIR} mkdir ${DESTDIR} ${SRCDIR} -( +{ [= (shellf for f in %s @@ -36,7 +36,7 @@ while read g do echo \ mkdir \\${SRCDIR}/$g || mkdir -p \\${SRCDIR}/$g || exit 1\ done (join (stack fix.files)) ) =] -) 2 /dev/null[= # suppress 'No such file or directory' messages =] +} 2 /dev/null[= # suppress 'No such file or directory' messages =] cd inc [= (define sfile ) @@ -114,29 +114,21 @@ sed 's/\(#define __[A-Z_]*_TYPE__\).*/\1/' sys/types.h XX mv -f XX sys/types.h -# The following subshell weirdness is for saving an exit -# status from within a while loop that reads input. If you can -# think of a cleaner way, suggest away, please... -# -exitok=` exec ${TESTDIR}/LIST while read f do if [ ! -f ${TESTBASE}/$f ] then -echo Newly fixed header: $f 2 -exitok=false +echo FAIL: Newly fixed header: $f 2 - elif cmp $f ${TESTBASE}/$f 2 + elif cmp $f ${TESTBASE}/$f then : else -${DIFF:-diff} -c $f ${TESTBASE}/$f 2 || : -exitok=false +${DIFF:-diff} -c $f ${TESTBASE}/$f fi -done -echo $exitok` +done FAILURES.txt cd $TESTBASE @@ -144,30 +136,36 @@ fgrep -v 'CVS/' | \ fgrep -v '.svn/' ${TESTDIR}/LIST -exitok=` exec ${TESTDIR}/LIST while read f do if [ -s $f ] [ ! -f ${DESTDIR}/$f ] then -echo Missing header fix: $f 2 -exitok=false +echo FAIL: Missing header fix: $f fi -done -echo $exitok` +done ${DESTDIR}/FAILURES.txt + +fix_sum_fmt='%s: fixincludes + +# of expected passes1 +# of expected failures 0 +# of unexpected failures%s\n' echo -if $exitok +if test -s ${DESTDIR}/FAILURES.txt then - cd ${TESTDIR} - rm -rf inc res LIST - cd .. - rmdir ${TESTDIR} /dev/null 21 || : - echo All fixinclude tests pass 2 -else - echo There were fixinclude test FAILURES 2 -fi -$exitok[= + echo There were fixinclude test FAILURES + cat ${DESTDIR}/FAILURES.txt + printf $fix_sum_fmt FAIL 1 ${DESTDIR}/fixincludes.sum + exit 1 +fi 2 + +printf $fix_sum_fmt PASS 0 ${DESTDIR}/fixincludes.sum +cd ${TESTDIR} +rm -rf inc res LIST +cd .. +rmdir ${TESTDIR} /dev/null 21 || : +echo All fixinclude tests pass 2[= (if (defined? 'set-writable) (set-writable))
Re: [PATCH] AIX malloc.h fixincludes
On Fri, Mar 23, 2012 at 11:47 AM, David Edelsohn dje@gmail.com wrote: Some early releases of AIX 6 include a malloc.h header with an incorrect use of builtin keyword: #ifdef __cplusplus extern C { extern builtin char *__alloca (size_t); # define alloca __alloca } #endif /* def __cplusplus */ GCC is not too happy about this. clearly. Okay for trunk, 4.7 and 4.6? OK for any open branch you care to apply it to.
Re: [Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L
To eliminate any possible ambiguity, the patch is approved On 01/10/12 23:49, andreast at gcc dot gnu.org wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705 Andreas Toblerandreast at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #46 from Andreas Toblerandreast at gcc dot gnu.org 2012-01-11 07:49:41 UTC --- I'm going to apply the patch from comment #45 this evening. Bootstraped several times, make check in fixincludes successful. This is the CL I prepared: 2012-01-11 Bruce Korbbk...@gnu.org Steven G. Karglka...@gcc.gnu.org Andreas Toblerandre...@fgznet.ch PR bootstrap/57105 PR preprocessor/51776 * inclhack.def (cdef_cplusplus): Add a replacement for [[noreturn]]. * fixincl.x: Regenerate. * tests/base/sys/cdefs.h: Update. * genfixes: Remove the 'Ver.' from the version check. Index: inclhack.def === --- inclhack.def(revision 183089) +++ inclhack.def(working copy) @@ -20,6 +20,7 @@ FIXINC_DEBUG = yes; #endif + /* On AIX when _LARGE_FILES is defined stdio.h defines fopen to * fopen64 etc. and this causes problems when building with g++ * because cstdio udefs everything from stdio.h, leaving us with @@ -1028,6 +1029,22 @@ test_text = '#define vfscanf __svfscanf'; }; +/* + * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests + * that it conforms to ISO/IEC 14882:2011. Until G++ fully conforms, + * it should not set __cplusplus to that value. It currently does + * not support the [[noreturn]] procedure attribute. + * When it does, this hack should be removed. + * SEE: gcc.gnu.org/bugzilla/show_bug.cgi?id=51776 + */ +fix = { +hackname = cdef_cplusplus; +files = sys/cdefs.h; +select= '\[\[noreturn\]\]'; +c_fix = format; +c_fix_arg = '__attribute__((__noreturn__))'; +test_text = #define _Noreturn[[noreturn]]; +}; /* * Fix various macros used to define ioctl numbers. Index: tests/base/sys/cdefs.h === --- tests/base/sys/cdefs.h (revision 183089) +++ tests/base/sys/cdefs.h (working copy) @@ -9,6 +9,11 @@ +#if defined( CDEF_CPLUSPLUS_CHECK ) +#define _Noreturn __attribute__((__noreturn__)) +#endif /* CDEF_CPLUSPLUS_CHECK */ + + #if defined( FREEBSD_GCC3_BREAKAGE_CHECK ) #if __GNUC__ == 2 __GNUC_MINOR__ = 7 #endif /* FREEBSD_GCC3_BREAKAGE_CHECK */ Index: genfixes === --- genfixes(revision 183089) +++ genfixes(working copy) @@ -62,7 +62,7 @@ AG=autogen $AG set -e -if [ -z `${AG} -v | fgrep 'Ver. 5.'` ] +if [ -z `${AG} -v | fgrep ' 5.'` ] then echo AutoGen appears to be out of date or not correctly installed. echo Please download and install:
Re: [PATCH,fixincldes] AIX assert.h static_assert
Sure. Looks fine. Please apply to all active branches. On Sat, Aug 31, 2013 at 4:40 PM, David Edelsohn dje@gmail.com wrote:
Re: fixincludes patch RFA: Fix fenv.h on Ubuntu Precise
On 11/06/13 15:29, Ian Lance Taylor wrote: When fenv.h is not fixed, libquadmath does not build. This patch works around the problem. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for mainline? Hi Ian, Yes, please. This time, I'm on my dev box and looked at the code. You remembered correctly that the first file name in the list of file names needs to not have wild card characters so that the testing scheme can create a file by that name. A directory named * is possible, but inconvenient. Anyway, it also matches prior art in: /* * glibc_c99_inline_3 */ fix = { hackname = glibc_c99_inline_3; files = bits/string2.h, '*/bits/string2.h'; but is inconsistent with: /* Some versions of glibc have a version of bits/string2.h that produces value computed is not used warnings from strncpy; fix this definition by using __builtin_strncpy instead as in newer versions. */ fix = { hackname = glibc_strncpy; files = bits/string2.h; Hmmm. Does that fix need fixing, too? Thanks -Bruce
Re: fixincludes patch RFA: Fix fenv.h on Ubuntu Precise
So is this the right patch? $ svn diff inclhack.def Index: inclhack.def === --- inclhack.def(revision 204533) +++ inclhack.def(working copy) @@ -1738,7 +1738,7 @@ versions. */ fix = { hackname = glibc_strncpy; -files = bits/string2.h; +files = bits/string2.h, '*/bits/string2.h'; bypass= __builtin_strncpy; c_fix = format; c_fix_arg = # define strncpy(dest, src, n) __builtin_strncpy (dest, src, n); @@ -2411,7 +2411,7 @@ */ fix = { hackname = huge_val_hex; -files = bits/huge_val.h; +files = bits/huge_val.h, '*/bits/huge_val.h'; select= ^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*; bypass= __builtin_huge_val; @@ -2426,7 +2426,7 @@ */ fix = { hackname = huge_valf_hex; -files = bits/huge_val.h; +files = bits/huge_val.h, '*/bits/huge_val.h'; select= ^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*; bypass= __builtin_huge_valf; @@ -2441,7 +2441,7 @@ */ fix = { hackname = huge_vall_hex; -files = bits/huge_val.h; +files = bits/huge_val.h, '*/bits/huge_val.h'; select= ^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*; bypass= __builtin_huge_vall; @@ -4226,7 +4226,7 @@ fix = { hackname = thread_keyword; files = pthread.h; -files = bits/sigthread.h; +files = bits/sigthread.h, '*/bits/sigthread.h'; select= ([* ])__thread([,)]); c_fix = format; c_fix_arg = %1__thr%2; @@ -4767,7 +4767,7 @@ fix = { hackname = feraiseexcept_nosse_invalid; mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*'; -files = bits/fenv.h; +files = bits/fenv.h, '*/bits/fenv.h'; select= ^([\t ]*)__asm__ __volatile__ \\(\divss %0, %0 *\ : : \x\ \\(__f\\)\\);$; bypass= \fdiv .*; fwait\; @@ -4794,7 +4794,7 @@ fix = { hackname = feraiseexcept_nosse_divbyzero; mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*'; -files = bits/fenv.h; +files = bits/fenv.h, '*/bits/fenv.h'; select= ^([\t ]*)__asm__ __volatile__ \\(\divss %1, %0 *\ : : \x\ \\(__f\\), \x\ \\(__g\\)\\);$; bypass= \fdivp .*; fwait\;
Re: fixincludes patch RFA: Fix fenv.h on Ubuntu Precise
OK. It will be a couple of days. On Thu, Nov 7, 2013 at 1:01 PM, Ian Lance Taylor i...@google.com wrote: In the meantime I've committed my version of the patch to the gccgo branch. It will be updated to whatever the final mainline version is the next time I merge from mainline to the gccgo branch. Ian On Thu, Nov 7, 2013 at 10:16 AM, Ian Lance Taylor i...@google.com wrote: On Thu, Nov 7, 2013 at 8:48 AM, Bruce Korb bk...@gnu.org wrote: This time, I'm on my dev box and looked at the code. You remembered correctly that the first file name in the list of file names needs to not have wild card characters so that the testing scheme can create a file by that name. A directory named * is possible, but inconvenient. Anyway, it also matches prior art in: /* * glibc_c99_inline_3 */ fix = { hackname = glibc_c99_inline_3; files = bits/string2.h, '*/bits/string2.h'; but is inconsistent with: /* Some versions of glibc have a version of bits/string2.h that produces value computed is not used warnings from strncpy; fix this definition by using __builtin_strncpy instead as in newer versions. */ fix = { hackname = glibc_strncpy; files = bits/string2.h; Hmmm. Does that fix need fixing, too? I didn't worry about that and the other cases because they are fixing problems that existed in past glibc versions before Ubuntu changed their directory layouts. But of course there is nothing wrong with fixing them too. Your proposed patch looks fine to me and I think you should go ahead and commit. Or I can if you prefer for some reason. Ian
Re: [PATCH] fixincludes: use $(FI) instead of fixincl@EXEEXT@
Sure. Looks good to me. Thanks On Fri, Nov 8, 2013 at 2:57 AM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: On 4 April 2013 22:20, Bruce Korb bk...@gnu.org wrote: Except as noted below, fine by me. On 04/04/13 12:56, Bernhard Reutner-Fischer wrote: Bootstrapped and regtested on x86_64-unknown-linux-gnu and x86_64-mine-linux-uclibc without regressions, ok for trunk? fixincludes/ChangeLog: 2013-04-04 Bernhard Reutner-Fischer al...@gcc.gnu.org Makefile.in: Use $(FI) instead of fixincl@EXEEXT@. Cleanup whitespace while at it. Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- fixincludes/Makefile.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in index ce850ff..3dc869d 100644 --- a/fixincludes/Makefile.in +++ b/fixincludes/Makefile.in @@ -131,7 +131,7 @@ fixinc.sh : fixinc.in mkfixinc.sh Makefile $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def cd $(srcdir) ; $(SHELL) ./genfixes -mostlyclean : +mostlyclean: I see no reason for changing things. dropped this hunk. But if you are going to clean up the colons, then they should be in columns (mostly 12 or 16). This one is already in 12. rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh clean: mostlyclean @@ -179,18 +179,18 @@ check : all install : all -rm -rf $(DESTDIR)$(itoolsdir) - $(mkinstalldirs) $(DESTDIR)$(itoolsdir) + $(mkinstalldirs) $(DESTDIR)$(itoolsdir) $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include $(INSTALL_DATA) $(srcdir)/README-fixinc \ $(DESTDIR)$(itoolsdatadir)/include/README $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh - $(INSTALL_PROGRAM) fixincl@EXEEXT@ \ - $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@ + $(INSTALL_PROGRAM) $(FI) \ + $(DESTDIR)$(itoolsdir)/$(FI) This should now fit on a single line. ok $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders install-strip: install test -z '$(STRIP)' \ - || $(STRIP) $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@ + || $(STRIP) $(DESTDIR)$(itoolsdir)/$(FI) changed this too to be on a single line now. .PHONY: all check install install-strip .PHONY: dvi pdf info html install-pdf install-info install-html Changelog remains the same. II was using the attached updated patch since April, ok for trunk?
Re: How to patch fixincludes/Makefile for Interix?
Hi Doug, On Fri, Jun 3, 2011 at 10:00 AM, Douglas B Rupp r...@gnat.com wrote: I've been working on a resurrection patch for Interix, one remaining problem is fixincludes/fixincl.c must be compiled on native Interix with -D_ALL_SOURCE in order to find the getpagesize prototype. This works (taking some liberties with diff...): fixincludes/Makefile.in -FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES) +FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES) -D_ALL_SOURCE Obviously unacceptable in general. Obviously. Fixincludes ignores a config/mh-interix, so adding FIXINC_CFLAGS += -D_ALL_SOURCE doesn't work. What is the correct solution? Any advice would be greatly appreciated. Without digging into makefile magic, it would seem to me that you'd want to jigger Makefile.in to source $(top_srcdir)/config/mh-$(target) and use FIXINC_CPPFLAGS (this being a pre-processor flag).
Re: [PATCH] fixincludes/Makefile for Interix
On 06/04/11 13:43, Douglas B Rupp wrote: Here's my proposed patch, along the lines you suggested. Hi Doug, Excellent. Just a couple nits: It is more normal and easier to read when you quote the entire shell script fragment, as below (removing unnecessary eval, too): diff -rupN gcc.orig/fixincludes/configure.ac gcc/fixincludes/configure.ac --- gcc.orig/fixincludes/configure.ac 2011-04-06 17:01:09.0 -0700 +++ gcc/fixincludes/configure.ac2011-06-04 13:18:23.0 -0700 @@ -23,6 +23,20 @@ ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual] # Determine the noncanonical target name, for directory use. ACX_NONCANONICAL_TARGET +[host_makefile_frag=/dev/null +if test -d ${srcdir}/../config ; then +case ${host} in + *-interix[3-9]*) +host_makefile_frag=${srcdir}/../config/mh-interix +;; +esac +fi] +AC_SUBST_FILE(host_makefile_frag) + # Specify the local prefix local_prefix= AC_ARG_WITH(local-prefix,
Re: AIX net/if_arp.h include fix for struct fc_softc
On 06/05/11 21:16, Peter O'Gorman wrote: Ok for trunk? Peter Index: ChangeLog === --- ChangeLog (revision 174678) 2011-??-?? Peter O'Gorman po...@thewrittenword.com * inclhack.def (aix_net_if_arp): New fix. * fixincl.x: Regenerate. * tests/base/net/if_arp.h [AIX_NET_IF_ARP_CHECK]: New test. Index: inclhack.def === --- inclhack.def(revision 174678) +++ inclhack.def(working copy) @@ -369,6 +369,19 @@ test_text = #define _Complex_I __I\n; }; +/* + * net/if_arp.h defines a variable fc_softc instead of adding a + * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1 + */ +fix = { +hackname = aix_net_if_arp; +mach = *-*-aix*; +files = net/if_arp.h; +select= ^struct fc_softc \\{; +c_fix = format; +c_fix_arg = typedef struct _fc_softc {; +test_text = struct fc_softc {; +}; /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace Please be kind enough to make the test text sample be a complete struct, even if it only has one int field. Aesthetics. Sorry. The change log showed a change for tests/base/net/if_arp.h, but the patch did not. Otherwise, fine by me.
Re: [PATCH] Fix bootstrap on OpenBSD, PR48851
Hi Richard, On Mon, Jul 4, 2011 at 4:04 AM, Richard Guenther rguent...@suse.de wrote: It happens that OpenBSD suffers from a bogus fixinclude that changes its perfectly valid NULL define from (void *)0 to 0. The fix itself appears to be very old and is completely bogus - it replaces (void *)0 with 0 under the assumption the former is invalid for C++ - which is true - but 0 is inappropriate for C which is much worse. Thus, I propose to remove the fix altogether. Platform maintainers can arrange for a new fix if the platforms still need fixing (which I seriously doubt after so many years and platform obsoletion). This restores bootstrap on OpenBSD. Ok for trunk and active branches? Sounds completely reasonable to me, but I think the platform maintainers do need to say, okay. Cheers - Bruce
../.././gcc/system.h:28:20: fatal error: stdarg.h: No such file or directory
Say, what? Anyone know what this is about? cp ../.././gcc/../fixincludes/README-fixinc include-fixed/README chmod a+r include-fixed/README echo timestamp stmp-int-hdrs TARGET_CPU_DEFAULT= \ HEADERS=auto-host.h ansidecl.h DEFINES=USED_FOR_TARGET \ /bin/sh ../.././gcc/mkconfig.sh tconfig.h (SHLIB='true'; \ g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace -DSTANDARD_STARTFILE_PREFIX=\../../../\ -DSTANDARD_EXEC_PREFIX=\/u/gnu/proj/gcc-svn-inst/lib64/gcc/\ -DSTANDARD_LIBEXEC_PREFIX=\/u/gnu/proj/gcc-svn-inst/lib/gcc/\ -DDEFAULT_TARGET_VERSION=\4.8.0\ -DDEFAULT_TARGET_MACHINE=\x86_64-unknown-linux-gnu\ -DSTANDARD_BINDIR_PREFIX=\/u/gnu/proj/gcc-svn-inst/bin/\ -DTOOLDIR_BASE_PREFIX=\../../../../\ `test X${SHLIB} = X || test yes != yes || echo -DENABLE_SHARED_LIBGCC` -DCONFIGURE_SPECS=\\ \ -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace ../.././gcc/cp/g++spec.c) g++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o g++ \ gcc.o ggc-none.o g++spec.o driver-i386.o libcommon-target.a \ libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -Ilto -I../.././gcc -I../.././gcc/lto -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace../.././gcc/lto/lto-lang.c -o lto/lto-lang.o In file included from ../.././gcc/lto/lto-lang.c:22:0: ../.././gcc/system.h:28:20: fatal error: stdarg.h: No such file or directory #include stdarg.h ^ compilation terminated. make[3]: *** [lto/lto-lang.o] Error 1 make[3]: Leaving directory `/u/gnu/proj/gcc-svn-bld/host-x86_64-unknown-linux-gnu/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/u/gnu/proj/gcc-svn-bld' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/u/gnu/proj/gcc-svn-bld' make: *** [all] Error 2
Parts 3 and 4 to the vxworks/fixincludes patches
The first two patches I've applied. The remaining two are needed to fully enable building the VxWorks flavor of GCC, but those bits affect parts outside of fixincludes and there is some breakage somewhere. All evidence seems to me to show fixincludes still doing its thing correctly, but somewhere along the line the build becomes confused and unable to find stdarg.h: echo timestamp stmp-int-hdrs g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables \ -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute \ -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common \ -DHAVE_CONFIG_H -I. -Ilto -I../.././gcc -I../.././gcc/lto -I../.././gcc/../include \ -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber \ -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace \ ../.././gcc/lto/lto-lang.c -o lto/lto-lang.o In file included from ../.././gcc/lto/lto-lang.c:22:0: ../.././gcc/system.h:28:20: fatal error: stdarg.h: No such file or directory #include stdarg.h ^ compilation terminated. I have not been able to run down the cause. Until I've found it, I'm holding back on the bits that change stuff outside of fixincludes: gcc/gcov-io.c libstdc++-v3/config/os/vxworks/os_defines.h configure.ac I hope someone knows what this is.
Re: Parts 3 and 4 to the vxworks/fixincludes patches
Hi Robert, On Thu, Nov 1, 2012 at 6:35 AM, rbmj r...@verizon.net wrote: and now my patches will build on top of trunk. Bruce, can you give steps on how to reproduce the error you reported? rm -rf gcc-bld gcc-ins cp -l gcc-svn gcc-bld pfx=$PWD/gcc-ins cd gcc-bld ./configure --enable-languages=c,c++ --prefix=$pfx CFLAGS='-g2 -Wall' make I never build in my source tree.
VxWorks is done
Index: gcc/gcov-io.c === --- gcc/gcov-io.c (revision 193123) +++ gcc/gcov-io.c (working copy) @@ -92,7 +92,8 @@ { /* Read-only mode - acquire a read-lock. */ s_flock.l_type = F_RDLCK; - fd = open (name, O_RDONLY); + /* pass mode (ignored) for compatibility */ + fd = open (name, O_RDONLY, S_IRUSR | S_IWUSR); } else { Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 193123) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2012-11-03 Robert Mason r...@verizon.net + + * gcov-io.c (gcov_open): Add file mode to open call (need for VxWorks) + 2012-11-03 Sandra Loosemore san...@codesourcery.com * doc/extend.texi: Copy-edit to use present tense except when Index: libstdc++-v3/config/os/vxworks/os_defines.h === --- libstdc++-v3/config/os/vxworks/os_defines.h (revision 193123) +++ libstdc++-v3/config/os/vxworks/os_defines.h (working copy) @@ -33,4 +33,10 @@ // System-specific #define, typedefs, corrections, etc, go here. This // file will come before all others. +//Keep vxWorks from defining min()/max() as macros +#ifdef NOMINMAX +#undef NOMINMAX +#endif +#define NOMINMAX 1 + #endif Index: libstdc++-v3/ChangeLog === --- libstdc++-v3/ChangeLog (revision 193123) +++ libstdc++-v3/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2012-11-03 Robert Mason r...@verizon.net + + * config/os/vxworks/os_defines.h: + Keep vxWorks from defining min()/max() as macros + 2012-11-03 Jonathan Wakely jwakely@gmail.com * doc/html/*: Regenerate. Index: configure.ac === --- configure.ac (revision 193123) +++ configure.ac (working copy) @@ -427,6 +427,15 @@ ENABLE_LIBSSP=$enableval, ENABLE_LIBSSP=yes) +AC_ARG_ENABLE(libstdcxx, +AS_HELP_STRING([--disable-libstdcxx], + [do not build libstdc++-v3 directory]), +ENABLE_LIBSTDCXX=$enableval, +ENABLE_LIBSTDCXX=default) +[if test ${ENABLE_LIBSTDCXX} = no ; then + noconfigdirs=$noconfigdirs libstdc++-v3 +fi] + # Save it here so that, even in case of --enable-libgcj, if the Java # front-end isn't enabled, we still get libgcj disabled. libgcj_saved=$libgcj @@ -562,19 +571,22 @@ esac # Disable libstdc++-v3 for some systems. -case ${target} in - *-*-vxworks*) -# VxWorks uses the Dinkumware C++ library. -noconfigdirs=$noconfigdirs target-libstdc++-v3 -;; - arm*-wince-pe*) -# the C++ libraries don't build on top of CE's C libraries -noconfigdirs=$noconfigdirs target-libstdc++-v3 -;; - avr-*-*) -noconfigdirs=$noconfigdirs target-libstdc++-v3 -;; -esac +# Allow user to override this if they pass --enable-libstdc++-v3 +if test ${ENABLE_LIBSTDCXX} = default ; then + case ${target} in +*-*-vxworks*) + # VxWorks uses the Dinkumware C++ library. + noconfigdirs=$noconfigdirs target-libstdc++-v3 + ;; +arm*-wince-pe*) + # the C++ libraries don't build on top of CE's C libraries + noconfigdirs=$noconfigdirs target-libstdc++-v3 + ;; +avr-*-*) + noconfigdirs=$noconfigdirs target-libstdc++-v3 + ;; + esac +fi # Disable Fortran for some systems. case ${target} in Index: ChangeLog === --- ChangeLog (revision 193123) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2012-11-03 Robert Mason r...@verizon.net + + * configure.ac: add --disable-libstdcxx configure option + and handle defaulted state only for VxWorks, ARM-wince-pe and AVR. + 2012-10-30 Ganesh Gopalasubramanian ganesh.gopalasubraman...@amd.com * MAINTAINERS (Write After Approval): Add myself.
Re: [PING] Re: VxWorks Patches Back from the Dead!
From my part, I'm willing to push the patch, but I need confirmation from Paolo and Nathan because some of it affects code outside of my authority. On Thu, Sep 20, 2012 at 7:02 PM, rbmj r...@verizon.net wrote: Ping? Just did a full pull and rebuild today and everything still works :) Robert Mason
git-svn: Unable to connect to a repository
Huh? Sorry. Don't know what else to say: Per: http://gcc.gnu.org/wiki/GitMirror $ git svn init -Ttrunk --prefix=origin/ svn+ssh://gcc.gnu.org/svn/gcc Network connection closed unexpectedly: Unable to connect to a repository at \ URL 'svn+ssh://gcc.gnu.org/svn/gcc': To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file. at /usr/lib/git/git-svn line 2299. 2287 sub init_remote_config { 2288 my ($self, $url, $no_write) = @_; 2289 $url =~ s!/+$!!; # strip trailing slash 2290 my $r = read_all_remotes(); 2291 my $existing = find_existing_remote($url, $r); 2292 if ($existing) { 2293 unless ($no_write) { 2294 print STDERR Using existing , 2295 [svn-remote \$existing\]\n; 2296 } 2297 $self-{repo_id} = $existing; 2298 } elsif ($_minimize_url) { 2299 my $min_url = Git::SVN::Ra-new($url)-minimize_url; 2300 $existing = find_existing_remote($min_url, $r);
Re: git-svn: Unable to connect to a repository
On 09/22/12 12:49, Bruce Korb wrote: Huh? Sorry. Don't know what else to say: Similar results using straight up svn: $ bash contrib/gcc_update Updating SVN tree svn: E155036: Please see the 'svn upgrade' command svn: E155036: Working copy '/u/gnu/proj/gcc-svn' is too old (format 10, created by Subversion 1.6) Adjusting file timestamps Touching Makefile.in... SVN update of full tree failed. $ svn ls svn+ssh://usern...@gcc.gnu.org/svn/gcc svn: E210002: Unable to connect to a repository at URL 'svn+ssh://usern...@gcc.gnu.org/svn/gcc' svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file. svn: E210002: Network connection closed unexpectedly SVN is behaving unexpectedly. Help, please?
Re: git-svn: Unable to connect to a repository
Hi Gaby, On 09/22/12 13:07, Gabriel Dos Reis wrote: SVN is behaving unexpectedly. Help, please? Have you upgraded your system or SVN recently? Not deliberately. :) Switched openSuSE releases (12.2 now). If yes, you need to issue the command $ svn upgrade It's been crunching on that for over 20 minutes now. I suppose it will finish eventually. [finished while writing this] Nonetheless, I do prefer to work with GIT over SVN, but that means I would need to debug the issues from my first missive on this topic. [now fixed, see below] (this has nothing to do with GCC. It is a general SVN thingy.) Still, dealing with anticipatable failures makes for good grist for the GCC wiki. Error messages like, remove the -q option are not helpful when you haven't used any -q option. And it was similar to the message from git svn: $ git svn init -Ttrunk --prefix=origin/ svn+ssh://gcc.gnu.org/svn/gcc Network connection closed unexpectedly: Unable to connect to a repository at \ URL 'svn+ssh://gcc.gnu.org/svn/gcc': To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file. at /usr/lib/git/git-svn line 2299. 2287 sub init_remote_config { [...] I surely don't see any -q on line 2299. Perhaps I need a korbb@ inserted before the gcc.gnu.org in the command? [a moment passes] Yep. That's it. the git svn init command should be augmented with my login id at gcc.gnu.org. Thank you! $ git svn init -Ttrunk --prefix=origin/ svn+ssh://logi...@gcc.gnu.org/svn/gcc So, remove the -q option really means, provide your login id. Not especially obvious. :( Thank you!! - Bruce
Re: [PATCH,fixincludes] Wrap fcntl.h on AIX
Does make check complain if a replacement/wrap fix doesn't have a test? If so, I'll be fixing it when I have time -- towards the end of October. (The patch I sent a few days ago ought to do it, but I've not fully tested yet.) Anyway, looks pretty reasonable to me... On Sat, Sep 29, 2012 at 9:45 AM, David Edelsohn dje@gmail.com wrote: AIX fcntl.h redefines open, which conflicts with g++ fstream header. This patch wraps fcntl.h to use aliases in the same way that stdio.h currently is wrapped. Okay? +test-text = ''; /* no way to test */
Re: [PATCH, fixincludes] Fix NULL on AIX
Hi David, Looks good to me, but for a small nit: On Tue, Apr 30, 2013 at 7:40 AM, David Edelsohn dje@gmail.com wrote: +c_fix_arg = #ifndef NULL\n + #ifdef __cplusplus\n + #ifdef __GNUG__\n + #define NULL\t__null\n + #else\t /* ! __GNUG__ */\n + #define NULL\t0L\n + #endif\t /* __GNUG__ */\n + #else\t /* ! __cplusplus */\n + #define NULL\t((void *)0)\n + #endif\t /* __cplusplus */\n + #endif\t /* !NULL */; I'd really prefer a here string: c-fix-arg = - _EOF_ #ifndef NULL #ifdef __cplusplus #ifdef __GNUG__ #define NULL__null #else /* ! __GNUG__ */ #define NULL0L #endif /* __GNUG__ */ #else /* ! __cplusplus */ #define NULL((void *)0) #endif /* __cplusplus */ #endif /* !NULL */ _EOF_; Unless there is some reason you want to emphasize tabs with the \t escapes. I think the here string is easier to read.
Re: [PATCH, fixincludes] Fix NULL on AIX
Hi, On Tue, Apr 30, 2013 at 9:42 AM, David Edelsohn dje@gmail.com wrote: I coped c_fix_arg from openbsd_null_definition fix. I don't know if two different formats for similar fixes would be confusing, but I do not have a problem using the EOF version. I haven't reviewed all patches and I don't always raise nits. Do you have any comment about the change to void_null fix? By analogy, I'd prefer the EOF version there, too. But ultimately, it works and is not exactly illegible, so I have no serious objection to the fix. It would be nice if it were combinable, but doing so is tricky. I'm guessing that the fix on AIX is separated because the headers contain __cplusplus and that is used as an exclusion test for the void_null fix? Otherwise this: select= ^#[ \t]*define[ \t]+NULL[ \t]+( \\(\\(void[ \t]*\\*\\)0\\) | \\(*0L*\\)* ); would allow void_null to work for you -- perhaps by using %1 somewhere in the replacement c-fix-arg. Cheers - Bruce
Re: [fixincludes] solaris_pow_int_overload should use __cplusplus
On 05/16/13 06:41, Rainer Orth wrote: Work is going on to incorporate all applicable fixincludes fixes into the Solaris headers proper. One fix is currently problematic since it uses an G++-internal macro (__GXX_EXPERIMENTAL_CXX0X__) where libstdc++ cmath already switched to testing __cplusplus. The following patch updates the fix to match cmath. Tested by mainline bootstraps on i386-pc-solaris2.11, sparc-sun-solaris2.11 and 4.8 bootstrap on i386-pc-solaris2.10. Ok for mainline and 4.8 branch if they pass? Look good to me. Thanks.
Fix Bug 51776 (finally...)
Index: ChangeLog === --- ChangeLog (revision 200737) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2013-07-06 Bruce Korb bk...@gnu.org + + * inclhack.def (cdef_cplusplus): removed, per Bug 51776 + 2013-05-23 Alexander Ivchenko alexander.ivche...@intel.com * inclhack.def (complier_h_tradcpp): New. Index: fixincl.x === --- fixincl.x (revision 200737) +++ fixincl.x (working copy) @@ -1,12 +1,12 @@ /* -*- buffer-read-only: t -*- vi: set ro: - * + * * DO NOT EDIT THIS FILE (fixincl.x) - * - * It has been AutoGen-ed May 23, 2013 at 04:44:10 PM by AutoGen 5.12 + * + * It has been AutoGen-ed July 6, 2013 at 10:40:53 AM by AutoGen 5.17.5pre10 * From the definitionsinclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 23 16:44:10 MSK 2013 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 6 10:40:53 PDT 2013 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 228 fixup descriptions. + * This file contains 227 fixup descriptions. * * See README for more information. * @@ -2072,41 +2072,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Cdef_Cplusplus fix - */ -tSCC zCdef_CplusplusName[] = - cdef_cplusplus; - -/* - * File name selection pattern - */ -tSCC zCdef_CplusplusList[] = - sys/cdefs.h\0; -/* - * Machine/OS name selection pattern - */ -#define apzCdef_CplusplusMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zCdef_CplusplusSelect0[] = - \\[\\[noreturn\\]\\]; - -#defineCDEF_CPLUSPLUS_TEST_CT 1 -static tTestDesc aCdef_CplusplusTests[] = { - { TT_EGREP,zCdef_CplusplusSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Cdef_Cplusplus - */ -static const char* apzCdef_CplusplusPatch[] = { -format, -__attribute__((__noreturn__)), -(char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Ctrl_Quotes_Def fix */ tSCC zCtrl_Quotes_DefName[] = @@ -9364,9 +9329,9 @@ * * List of all fixes */ -#define REGEX_COUNT 267 +#define REGEX_COUNT 266 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT228 +#define FIX_COUNT227 /* * Enumerate the fixes @@ -9418,7 +9383,6 @@ BROKEN_CABS_FIXIDX, BROKEN_NAN_FIXIDX, BSD_STDIO_ATTRS_CONFLICT_FIXIDX, -CDEF_CPLUSPLUS_FIXIDX, CTRL_QUOTES_DEF_FIXIDX, CTRL_QUOTES_USE_FIXIDX, CXX_UNREADY_FIXIDX, @@ -9833,11 +9797,6 @@ BSD_STDIO_ATTRS_CONFLICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aBsd_Stdio_Attrs_ConflictTests, apzBsd_Stdio_Attrs_ConflictPatch, 0 }, - { zCdef_CplusplusName,zCdef_CplusplusList, - apzCdef_CplusplusMachs, - CDEF_CPLUSPLUS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aCdef_CplusplusTests, apzCdef_CplusplusPatch, 0 }, - { zCtrl_Quotes_DefName,zCtrl_Quotes_DefList, apzCtrl_Quotes_DefMachs, CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, Index: inclhack.def === --- inclhack.def (revision 200737) +++ inclhack.def (working copy) @@ -64,7 +64,6 @@ _EOArg_; }; - /* On AIX when _LARGE_FILES is defined fcntl.h defines open to * open64 and creat to creat64. This fixes fcntl.h to * undef those defines and use __asm__ to alias the symbols if @@ -103,7 +102,6 @@ _EOArg_; }; - /* * On Mac OS 10.3.9, the 'long double' functions are available in * libSystem, but are not prototyped in math.h. @@ -237,7 +235,6 @@ _EndOfHeader_; }; - /* * This fixes __FD_ZERO bug for glibc-1.x */ @@ -275,7 +272,6 @@ _EndOfHeader_; }; - /* * This fixes __FD_ZERO bug for glibc-2.0.x */ @@ -317,7 +313,6 @@ _EndOfHeader_; }; - /* * Solaris sys/varargs.h is a DDK (aka kernel-land) header providing * the same interface as stdarg.h. No idea why they couldn't have just @@ -336,7 +331,6 @@ _EndOfHeader_; }; - /* * Fix non-ANSI memcpy declaration that conflicts with gcc's builtin * declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because @@ -574,7 +568,6 @@ _EndOfHeader_; }; - /* * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I, * which only is provided by AIX xlc C99. @@ -727,7 +720,6 @@ {...init stuff...}; }; - /* * AIX stdint.h fixes. */ @@ -744,7 +736,9 @@ #define UINT16_MAX (65535U); }; - +/* + * aix_stdint_2 + */ fix = { hackname = aix_stdint_2; mach = *-*-aix*; @@ -773,7 +767,9 @@ #define UINTPTR_MAX UINT32_MAX; }; - +/* + * aix_stdint_3 + */ fix = { hackname
fixincludes 2013-05-23 Alexander Ivchenko alexander.ivche...@intel.com
Alexander Ivchenko Mon, 29 Apr 2013 23:24:55 -0700 2013/4/29 Mike Stump mikest...@comcast.net: On Jan 9, 2013, at 7:14 AM, Alexander Ivchenko aivch...@gmail.com wrote: We have test fail for gcc.dg/cpp/trad/include.c on Android. The reason for that is that -ftraditional-cpp is not expected to work on Android due to variadic macro (like #define __builtin_warning(x, y...)) in standard headers and traditional preprocessor cannot handle them. The attached patch disables that test. Be sure to ask, Ok? in your patch submittals. Ok. thank you! I thought I did ask.. ... in standard headers and traditional preprocessor cannot handle them. is it ok for trunk? could someone commit that patch please? I don't have commit access. Actually, Alexander, you did not ask. And Kirill, you didn't verify before applying the patch. Patches to fixincludes are generally safe, but it is protocol to ask. Also, I prefer that the hacks get inserted alphabetically. So, actually, there are a few small complaints. $ fgrep -i fixincludes ../MAINTAINERS fixincludes Bruce Korb bk...@gnu.org The patch looks pretty reasonable, but I think someone else should verify the obsolescence. I also think it should be renamed to something like obsolete_builtin_warning because the current name gives no clue about what it really is. /* * Old Linux kernel's compiler.h header breaks Traditional CPP */ fix = { hackname = complier_h_tradcpp; files = linux/compiler.h; select= #define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\); c_fix = format; c_fix_arg = /* __builtin_warning(x, y...) is obsolete */; test_text = #define __builtin_warning(x, y...) (1); };
Re: fixincludes 2013-05-23
Hi, On Mon, Jul 8, 2013 at 5:05 AM, Alexander Ivchenko aivch...@gmail.com wrote: Hi Bruce, That was my original letter: Hi, Could you please take a look at the attached fixinclude patch that addresses the problem: We have test fail for gcc.dg/cpp/trad/include.c on Android. The reason for that is that -ftraditional-cpp is not expected to work on Android due to variadic macro (like #define __builtin_warning(x, y...)) in standard headers and traditional preprocessor cannot handle them. is it ok for trunk? thanks, Alexander So I did ask whether it is ok or not. And then I got: Be sure to ask, Ok? in your patch submittals. Ok. Oops. Wrong word. I said, you didn't ask and meant to say you didn't get approval. I didn't see the original request because there was no hint about fixincludes in the subject and I was not on the to/cc line. So you asked, just not effectively enough for me to see it and you did _not_ get approval. Still: Also, I prefer that the hacks get inserted alphabetically. So, actually, there are a few small complaints. The patch looks pretty reasonable, but I think someone else should verify the obsolescence. I also think it should be renamed to something like obsolete_builtin_warning because the current name gives no clue about what it really is. /* * Old Linux kernel's compiler.h header breaks Traditional CPP */ fix = { hackname = complier_h_tradcpp; files = linux/compiler.h; select= #define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\); c_fix = format; c_fix_arg = /* __builtin_warning(x, y...) is obsolete */; test_text = #define __builtin_warning(x, y...) (1); }; Please be kind enough to belatedly finish up and we'll (I'll) reapply it.
Re: fixincludes 2013-05-23
On Mon, Jul 8, 2013 at 11:42 AM, Alexander Ivchenko aivch...@gmail.com wrote: It sounds like it is better to fix the system headers instead. Via a fixincludes for older headers and have the android folks fix them for newer releases. Would that count for verifing? :) :) Indeed. I confess I didn't look past March. The patch is now in my inbox. I'll try to get to it next weekend.
Re: fatal error: gnu/stubs-32.h: No such file
On Mon, Jul 29, 2013 at 6:22 AM, Andrew Haley a...@redhat.com wrote: There should be a better diagnostic. If you remember, the start of this thread was: Why is it that configure worked but stubs-32.h was not found? That is the correct thing to do. The reply, basically, was: It's too hard. OK, fine, the backup is to Google: fatal error: gnu/stubs-32.h: No such file or directory and have an early hit that tells you that you did not configure some 32 bit developer package you had never heard of before. I guess that's easier than configure tests or #error directives for the folks who do the multi-lib stuff. But we know people are running into this issue and reporting it. Yes. But that on its own is not sufficient to change the default That's a pretty obnoxious comment. I translate it as, I don't care if people are having trouble. It is a nuisance to me to do that and anyone building GCC should already know they need whateveritwas-devel for 32 bits. I guess I can be obnoxious, too. But slightly more politely put: No, we aren't. We're disagreeing about whether it's acceptable to enable a feature by default that breaks the compiler build half way through with an obscure error message. Real systems need features that aren't enabled by default sometimes. The fundamental issue, to me, is: What do you do when you cannot proceed? I think you should detect the issue as *soon as practical* and then *ALWAYS* emit a message that *TELLS THE USER WHAT TO DO*. This failure is later than it could be and leaves the user hanging and twisting in the wind. Not good.
fixinclude patch for fenv.h on Ubuntu
This patch fixes Ian's issue, and several similar patterns: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00681.html $ make check autogen -T ../.././fixincludes/check.tpl ../.././fixincludes/inclhack.def /bin/sh ./check.sh ../.././fixincludes/tests/base Fixed: testing.h [[...]] Fixed: unistd.h All fixinclude tests pass /u/gnu/proj/gcc-svn-bld/build-x86_64-unknown-linux-gnu/fixincludes Full build for x86-64 in progress. Patch submission likely tomorrow. Index: fixincludes/ChangeLog === --- fixincludes/ChangeLog (revision 204533) +++ fixincludes/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2013-09-20 Bruce Korb bk...@gnu.org + + * inclhack.def: many of the headers found under bits/ are + often stashed under architecture directories. Apply fixes + to those, too. Also, re-ordered a couple of misordered fixes. + 2013-09-20 Alan Modra amo...@gmail.com * configure: Regenerate. Index: fixincludes/fixincl.x === --- fixincludes/fixincl.x (revision 204533) +++ fixincludes/fixincl.x (working copy) [[generated]] Index: fixincludes/inclhack.def === --- fixincludes/inclhack.def (revision 204533) +++ fixincludes/inclhack.def (working copy) @@ -1140,6 +1140,20 @@ }; /* + * Old Linux kernel's compiler.h header breaks Traditional CPP + */ +fix = { +hackname = complier_h_tradcpp; +files = linux/compiler.h; + +select= #define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\); +c_fix = format; +c_fix_arg = /* __builtin_warning(x, y...) is obsolete */; + +test_text = #define __builtin_warning(x, y...) (1); +}; + +/* * Fix various macros used to define ioctl numbers. * The traditional syntax was: * @@ -1509,6 +1523,60 @@ }; /* + * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64 + * that fails when compiling for SSE-less 32-bit x86. + */ +fix = { +hackname = feraiseexcept_nosse_invalid; +mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*'; +files = bits/fenv.h, '*/bits/fenv.h'; +select= ^([\t ]*)__asm__ __volatile__ \\(\divss %0, %0 *\ : + : \x\ \\(__f\\)\\);$; +bypass= \fdiv .*; fwait\; + +c_fix = format; +c_fix_arg = - _EOText_ + # ifdef __SSE_MATH__ + %0 + # else + %1__asm__ __volatile__ (fdiv st, st(0); fwait + %1 : =t (__f) : 0 (__f)); + # endif + _EOText_; + +test_text = - _EOText_ + __asm__ __volatile__ (divss %0, %0 : : x (__f)); + _EOText_; +}; + +/* + * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64 + * that fails when compiling for SSE-less 32-bit x86. + */ +fix = { +hackname = feraiseexcept_nosse_divbyzero; +mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*'; +files = bits/fenv.h, '*/bits/fenv.h'; +select= ^([\t ]*)__asm__ __volatile__ \\(\divss %1, %0 *\ : + : \x\ \\(__f\\), \x\ \\(__g\\)\\);$; +bypass= \fdivp .*; fwait\; + +c_fix = format; +c_fix_arg = - _EOText_ + # ifdef __SSE_MATH__ + %0 + # else + %1__asm__ __volatile__ (fdivp st, st(1); fwait + %1 : =t (__f) : 0 (__f), u (__g) : st(1)); + # endif + _EOText_; + +test_text = - _EOText_ + __asm__ __volatile__ (divss %1, %0 : : x (__f), x (__g)); + _EOText_; +}; + +/* * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume * neither the existence of GCC 3 nor its exact feature set yet break * (by design?) when __GNUC__ is set beyond 2. @@ -1738,7 +1806,7 @@ versions. */ fix = { hackname = glibc_strncpy; -files = bits/string2.h; +files = bits/string2.h, '*/bits/string2.h'; bypass= __builtin_strncpy; c_fix = format; c_fix_arg = # define strncpy(dest, src, n) __builtin_strncpy (dest, src, n); @@ -2411,7 +2479,7 @@ */ fix = { hackname = huge_val_hex; -files = bits/huge_val.h; +files = bits/huge_val.h, '*/bits/huge_val.h'; select= ^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*; bypass= __builtin_huge_val; @@ -2426,7 +2494,7 @@ */ fix = { hackname = huge_valf_hex; -files = bits/huge_val.h; +files = bits/huge_val.h, '*/bits/huge_val.h'; select= ^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*; bypass= __builtin_huge_valf; @@ -2441,7 +2509,7 @@ */ fix = { hackname = huge_vall_hex; -files = bits/huge_val.h; +files = bits/huge_val.h, '*/bits/huge_val.h'; select= ^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*; bypass= __builtin_huge_vall; @@ -4226,7 +4294,7 @@ fix = { hackname = thread_keyword; files = pthread.h; -files = bits/sigthread.h; +files = bits/sigthread.h, '*/bits/sigthread.h'; select= ([* ])__thread([,)]); c_fix = format; c_fix_arg = %1__thr%2; @@ -4760,72 +4828,4
fixinclude patch for fenv.h on Ubuntu
Adjusted for Richard Biener's patch Index: fixincludes/ChangeLog === --- fixincludes/ChangeLog (revision 205790) +++ fixincludes/ChangeLog (working copy) @@ -1,3 +1,14 @@ +2013-12-07 Bruce Korb bk...@gnu.org + + * inclhack.def: many of the headers found under bits/ are + often stashed under architecture directories. Apply fixes + to those, too. Also, re-ordered misordered fixes. + * tests/base/linux/vt.h: 80 columns in .def file limitation + * tests/base/iso/math_c99.h: adjust ordering + * tests/base/rtldef/string.h: likewise + * tests/base/bits/fenv.h: likewise + * tests/base/pthread.h: likewise + 2013-12-06 Richard Biener rguent...@suse.de * inclhack.def (suse_linux_vt_cxx): New fix for linux/vt.h Index: fixincludes/fixincl.x === --- fixincludes/fixincl.x (revision 205790) [[generated]] Index: fixincludes/tests/base/iso/math_c99.h === --- fixincludes/tests/base/iso/math_c99.h (revision 205790) +++ fixincludes/tests/base/iso/math_c99.h (working copy) @@ -20,6 +20,13 @@ #endif /* SOLARIS_MATH_1_CHECK */ +#if defined( SOLARIS_MATH_10_CHECK ) +#pragma ident @(#)math_c99.h 1.12 07/01/21 SMI +#undef isinf +#define isinf(x) __builtin_isinf(x) +#endif /* SOLARIS_MATH_10_CHECK */ + + #if defined( SOLARIS_MATH_2_CHECK ) #ident @(#)math_c99.h 1.9 04/11/01 SMI #undef INFINITY @@ -68,10 +75,3 @@ #undef isunordered #define isunordered(x, y) __builtin_isunordered(x, y) #endif /* SOLARIS_MATH_9_CHECK */ - - -#if defined( SOLARIS_MATH_10_CHECK ) -#pragma ident @(#)math_c99.h 1.12 07/01/21 SMI -#undef isinf -#define isinf(x) __builtin_isinf(x) -#endif /* SOLARIS_MATH_10_CHECK */ Index: fixincludes/tests/base/bits/fenv.h === --- fixincludes/tests/base/bits/fenv.h (revision 205790) +++ fixincludes/tests/base/bits/fenv.h (working copy) @@ -9,6 +9,16 @@ +#if defined( FERAISEEXCEPT_NOSSE_DIVBYZERO_CHECK ) +# ifdef __SSE_MATH__ + __asm__ __volatile__ (divss %1, %0 : : x (__f), x (__g)); +# else + __asm__ __volatile__ (fdivp %%st, %%st(1); fwait + : =t (__f) : 0 (__f), u (__g) : st(1)); +# endif +#endif /* FERAISEEXCEPT_NOSSE_DIVBYZERO_CHECK */ + + #if defined( FERAISEEXCEPT_NOSSE_INVALID_CHECK ) # ifdef __SSE_MATH__ __asm__ __volatile__ (divss %0, %0 : : x (__f)); @@ -17,13 +27,3 @@ : =t (__f) : 0 (__f)); # endif #endif /* FERAISEEXCEPT_NOSSE_INVALID_CHECK */ - - -#if defined( FERAISEEXCEPT_NOSSE_DIVBYZERO_CHECK ) -# ifdef __SSE_MATH__ - __asm__ __volatile__ (divss %1, %0 : : x (__f), x (__g)); -# else - __asm__ __volatile__ (fdivp %%st, %%st(1); fwait - : =t (__f) : 0 (__f), u (__g) : st(1)); -# endif -#endif /* FERAISEEXCEPT_NOSSE_DIVBYZERO_CHECK */ Index: fixincludes/tests/base/rtldef/string.h === --- fixincludes/tests/base/rtldef/string.h (revision 205790) +++ fixincludes/tests/base/rtldef/string.h (working copy) @@ -9,13 +9,13 @@ +#if defined( VMS_DECC_BUILTIN_CHECK ) +define FD_ZERO(__p) memset((__p), 0, sizeof(*(__p))) + +#endif /* VMS_DECC_BUILTIN_CHECK */ + + #if defined( VMS_DISABLE_DECC_STRING_BUILTINS_CHECK ) #if !defined(__VAX) !defined(__GNUC__) #endif /* VMS_DISABLE_DECC_STRING_BUILTINS_CHECK */ - - -#if defined( VMS_DECC_BUILTIN_CHECK ) -define FD_ZERO(__p) memset((__p), 0, sizeof(*(__p))) - -#endif /* VMS_DECC_BUILTIN_CHECK */ Index: fixincludes/tests/base/linux/vt.h === --- fixincludes/tests/base/linux/vt.h (revision 205790) +++ fixincludes/tests/base/linux/vt.h (working copy) @@ -10,5 +10,5 @@ #if defined( SUSE_LINUX_VT_CXX_CHECK ) -unsigned int newev; /* New console (if changing) */ +unsigned int newev; /* New console (if changing) */ #endif /* SUSE_LINUX_VT_CXX_CHECK */ Index: fixincludes/tests/base/pthread.h === --- fixincludes/tests/base/pthread.h (revision 205790) +++ fixincludes/tests/base/pthread.h (working copy) @@ -125,16 +125,6 @@ #endif /* SOLARIS_MUTEX_INIT_2_CHECK */ -#if defined( SOLARIS_RWLOCK_INIT_1_CHECK ) -#ident @(#)pthread.h 1.26 98/04/12 SMI -#if __STDC__ - 0 == 0 !defined(_NO_LONGLONG) -#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}} -#else -#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}} -#endif -#endif /* SOLARIS_RWLOCK_INIT_1_CHECK */ - - #if defined( SOLARIS_ONCE_INIT_1_CHECK ) #pragma ident @(#)pthread.h 1.37 04/09/28 SMI #if __STDC__ - 0 == 0 !defined(_NO_LONGLONG) @@ -156,6 +146,16 @@ #endif /* SOLARIS_ONCE_INIT_2_CHECK */ +#if defined( SOLARIS_RWLOCK_INIT_1_CHECK ) +#ident @(#)pthread.h 1.26 98/04/12 SMI +#if __STDC__ - 0 == 0 !defined(_NO_LONGLONG
Re: configure check for flex
On 12/08/13 13:06, Gerald Pfeifer wrote: Lovely. Thank you very much! $ svn diff Index: configure.ac === --- configure.ac(revision 205790) +++ configure.ac(working copy) @@ -1319,10 +1319,17 @@ # Used for setting $lt_cv_objdir _LT_CHECK_OBJDIR -# Check for GMP, MPFR and MPC +# Check for flex, GMP, MPFR and MPC +[for p in flex +do + c=`command -v $p` + test -x $c || \ +]AC_MSG_ERROR([the $p command is required to build GCC])[ +done + gmplibs=-lmpc -lmpfr -lgmp gmpinc= -have_gmp=no +have_gmp=no] # Specify a location for mpc # check for this first so it ends up on the link line before mpfr.
Re: configure check for flex
On Sun, Jan 26, 2014 at 9:38 PM, Hans-Peter Nilsson h...@bitrange.com wrote: On Sun, 8 Dec 2013, Bruce Korb wrote: On 12/08/13 13:06, Gerald Pfeifer wrote: Lovely. Thank you very much! (Looks like nobody replied to this and it isn't committed.) No, flex isn't required to build GCC as a hard and fast rule. It's not required for releases, just when building from a svn checkout (or really: when the flex-generated files are not in the source directory). You'd need some additional conditions. There might be the additional issue that any lex is expected to work too, not just flex. It isn't committed 'cuz nobody said, Okay. I do wish either someone would say, Okay. or come up with something that works. I went to the effort to figure out where things got off the rails and did something that worked for me. Just saying, That won't work without a workable alternative is a bit irritating. I do not know the difference between a checkout build and a normal configured build. My understanding was that generated files were to be part of the repo and that there was *not* a difference. If there is, then someone who understands the difference could maybe add some configure infrastructure to test the environment and decide if flex (or lex) was needed, rather than just say, what you did won't work.
Re: [PATCH] fixincludes: use $(FI) instead of fixincl@EXEEXT@
Except as noted below, fine by me. On 04/04/13 12:56, Bernhard Reutner-Fischer wrote: Bootstrapped and regtested on x86_64-unknown-linux-gnu and x86_64-mine-linux-uclibc without regressions, ok for trunk? fixincludes/ChangeLog: 2013-04-04 Bernhard Reutner-Fischer al...@gcc.gnu.org Makefile.in: Use $(FI) instead of fixincl@EXEEXT@. Cleanup whitespace while at it. Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- fixincludes/Makefile.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in index ce850ff..3dc869d 100644 --- a/fixincludes/Makefile.in +++ b/fixincludes/Makefile.in @@ -131,7 +131,7 @@ fixinc.sh : fixinc.in mkfixinc.sh Makefile $(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def cd $(srcdir) ; $(SHELL) ./genfixes -mostlyclean : +mostlyclean: I see no reason for changing things. But if you are going to clean up the colons, then they should be in columns (mostly 12 or 16). This one is already in 12. rm -f *.o *-stamp $(AF) $(FI) *~ fixinc.sh clean: mostlyclean @@ -179,18 +179,18 @@ check : all install : all -rm -rf $(DESTDIR)$(itoolsdir) - $(mkinstalldirs) $(DESTDIR)$(itoolsdir) + $(mkinstalldirs) $(DESTDIR)$(itoolsdir) $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include $(INSTALL_DATA) $(srcdir)/README-fixinc \ $(DESTDIR)$(itoolsdatadir)/include/README $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh - $(INSTALL_PROGRAM) fixincl@EXEEXT@ \ - $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@ + $(INSTALL_PROGRAM) $(FI) \ + $(DESTDIR)$(itoolsdir)/$(FI) This should now fit on a single line. $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders install-strip: install test -z '$(STRIP)' \ - || $(STRIP) $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@ + || $(STRIP) $(DESTDIR)$(itoolsdir)/$(FI) .PHONY: all check install install-strip .PHONY: dvi pdf info html install-pdf install-info install-html
Re: Remove unnecessary and harmful fixincludes for Android
Hi, On Tue, Aug 5, 2014 at 4:35 AM, Alexander Ivchenko aivch...@gmail.com wrote: Testing for *android* is less than ideal, because of the possibility of configuring a *-linux* toolchain to have multilibs using various different C libraries (with -mandroid being used to select the Android multilib). So, specifying a bypass based on some relevant text that appears in the header would be better. -- Joseph S. Myers jos...@codesourcery.com I've added check for BIONIC keyword. Hopefully it won't disappear. based on some relevant text I think that's important, too (that it be relevant). BIONIC is just some improbable text you found in the header. My guess is that testing for '*android*' would be more selective, and certainly less obscure. Who would ever guess that BIONIC implies android? Updated patch: diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index f7effee..e05412e 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2014-08-04 Alexander Ivchenko alexander.ivche...@intel.com + + * inclhack.def (stdio_va_list): Bypass fix for Bionic. + (complier_h_tradcpp): Remove. + * fixincl.x: Regenerate. + * tests/base/linux/compiler.h: Remove. + 2014-04-22 Rainer Orth r...@cebitec.uni-bielefeld.de * inclhack.def (math_exception): Bypass on *-*-solaris2.1[0-9]*. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x [[generated text is not needed for approval]] diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 6a1136c..bf452c6 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1140,20 +1140,6 @@ fix = { }; /* - * Old Linux kernel's compiler.h header breaks Traditional CPP - */ -fix = { -hackname = complier_h_tradcpp; [[ OK ]] @@ -3722,8 +3708,9 @@ fix = { fix = { hackname = stdio_va_list; files= stdio.h; -bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list'; +bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|BIONIC'; /* + * In Bionic va_list is always appropriately typedefed to __gnuc_va_list. And that typedef does not live in stdio.h either. If there is no better way to identify this file, then Is it ok? It is okay. (You may be left with little choice -- I can't see the header :).
Re: Remove unnecessary and harmful fixincludes for Android
Hi, On Tue, Aug 5, 2014 at 10:36 AM, enh e...@google.com wrote: you can see the current version of bionic's stdio.h here: https://android.googlesource.com/platform/bionic/+/master/libc/include/stdio.h i'm happy to add any string to the header file that makes things easier. if you want 'x-gcc-no-fixincludes' or whatever in there, just say :-) That would be great, but you could also add: /* this file depends on __gnuc_va_list being used for va_list */ and not bother changing fixincludes at all. :) But either of those two comments added to the header would be preferable to looking for BIONIC. Thank you! With one of the two changes, the patch is approved. Thanks!
Re: Remove unnecessary and harmful fixincludes for Android
Hi, Lines 42 43 are not needed for fixincludes, but it is your choice. With that change, you should not need to add that test to fixincludes because __gnuc_va_list will be found within the comment and satisfy the bypass expression. That was the long way of saying: Looks good to me. On Tue, Aug 5, 2014 at 5:09 PM, enh e...@google.com wrote: does https://android-review.googlesource.com/103445 look okay? On Tue, Aug 5, 2014 at 12:01 PM, Bruce Korb bk...@gnu.org wrote: Hi, On Tue, Aug 5, 2014 at 10:36 AM, enh e...@google.com wrote: you can see the current version of bionic's stdio.h here: https://android.googlesource.com/platform/bionic/+/master/libc/include/stdio.h i'm happy to add any string to the header file that makes things easier. if you want 'x-gcc-no-fixincludes' or whatever in there, just say :-) That would be great, but you could also add: /* this file depends on __gnuc_va_list being used for va_list */ and not bother changing fixincludes at all. :) But either of those two comments added to the header would be preferable to looking for BIONIC. Thank you! With one of the two changes, the patch is approved. Thanks!
Re: Remove unnecessary and harmful fixincludes for Android
Hi, On Wed, Aug 6, 2014 at 4:51 AM, Alexander Ivchenko aivch...@gmail.com wrote: We still have to remove fix for compiler.h: Correct. Thank you. Bruce, I think I formally have to ask for your approval again :) I don't think so. You've selected one of the changes we wrote about, so With one of the two changes, the patch is approved. is sufficient, as long as you have made either of the proposed changes. But to be clear: Approved. (: again :)
Re: [PATCH] PR other/63613: Add fixincludes for dejagnu.h
This is the first time I've touched the fixincludes directory; is this the correct way to make a change here? Well, I'd like to see it -- especially since it's your first. Please send to this gmail account or wait until I get my GNU email this weekend. Thanks! Successfully bootstrapped regrtested on x86_64-unknown-linux-gnu (Fedora 20). OK for trunk? More likely than not :)
Re: [PATCH] PR other/63613: Add fixincludes for dejagnu.h
On 12/05/14 12:32, Jeff Law wrote:1 fixincludes/ChangeLog: PR other/63613 * inclhack.def (dejagnu_h_make_inline_functions_static): New fix. * fixincl.x: Regenerate. * tests/base/dejagnu.h: New. OK. No, actually not. +fix = { +hackname = dejagnu_h_make_inline_functions_static; +files = dejagnu.h; + +sed = 's@^inline void$' + '@static inline void@'; I guess I should elaborate on the preferred substitution mechanism: the format fix. This is functionally equivalent but does not require loading the sed program: fix = { hackname = dejagnu_static_inline; files = dejagnu.h; select = '^inline void$'; c-fix = format; c-fix-arg = 'static %0'; Thank you.
Re: [off-list] A fixincludes warning-removal patch
On 12/14/14 14:07, Uros Bizjak wrote: Hello Bruce! I have posted a small fixincludes patch [1] that fixes a warning during the fixincludes build, Please apply. However, I'm sure it is not the last remaining warning since new warnings get invented. :) Thank you - Bruce 2014-12-09 Uros Bizjak ubiz...@gmail.com * server.c (server_setup): Check return value of getcwd and in case of error set buff[0] to 0. Bootstrapped on x86_64-linux-gnu. OK for mainline? Index: server.c === --- server.c(revision 218525) +++ server.c(working copy) @@ -192,7 +192,8 @@ server_setup (void) fputs (trap : 1\n, server_pair.pf_write); fflush (server_pair.pf_write); - getcwd (buff, MAXPATHLEN + 1); + if (getcwd (buff, MAXPATHLEN + 1) == NULL) +buff[0] = 0; p_cur_dir = xstrdup (buff); }
checksum test for fixincluding
Someone suggested this and it seemed like a reasonable thing to verify (pretty much) that only a specific version of a file should be fixed. I used the BSD check sum, so there is a 1/65000 chance of a false positive. Incorporating md5sum seemed over the top. Index: fixincludes/ChangeLog === --- fixincludes/ChangeLog (revision 218991) +++ fixincludes/ChangeLog (working copy) @@ -1,9 +1,20 @@ +2013-12-07 Bruce Korb bk...@gnu.org + + * fixincludes/fixincl.tpl: add handling for sum selection + criteria and clean up layout + * fixincludes/fixlib.h: enumerate TT_CKSUM test type + * fixincludes/fixincl.c (fix_applies): add code to handle + the new test type + (cksum_test): function to handle it + * fixincludes/README: doc it and remove explanations from + more than a decade ago. + 2014-12-15 Uros Bizjak ubiz...@gmail.com * server.c (server_setup): Check return value of getcwd and in case of error set buff[0] to 0. 2014-10-21 Uros Bizjak ubiz...@gmail.com * inclhack.def (glibc_c99_inline_4): Add pthread.h to files. * fixincl.x: Regenerate. Index: fixincludes/README === --- fixincludes/README (revision 218991) +++ fixincludes/README (working copy) @@ -1,30 +1,10 @@ -FIXINCLUDES OPERATION -= - -See also: http://autogen.SourceForge.net/fixinc.html - -The set of fixes required was distilled down to just the data required -to specify what needed to happen for each fix. Those data were edited -into a file named fixincludes/inclhack.def. A program called AutoGen -(http://autogen.SourceForge.net) uses these definitions to instantiate -several different templates that then produces code for a fixinclude -program (fixincl.x) and a shell script to test its functioning. On -certain platforms (viz. those that do not have functional bidirectional -pipes), the fixincl program is split into two. This should only concern -you on DOS and BeOS. - -Regards, - Bruce bk...@gnu.org - - - GCC MAINTAINER INFORMATION == If you are having some problem with a system header that is either broken by the manufacturer, or is broken by the fixinclude process, then you will need to alter or add information to the include fix definitions file, ``inclhack.def''. Please also send relevant information to gcc-b...@gcc.gnu.org, gcc-patches@gcc.gnu.org and, please, to me: bk...@gnu.org. @@ -76,27 +56,33 @@ identify the files with files = entries. If you use fnmatch(3C) wild card characters in a files entry, be certain that the first files entry has no such character. Otherwise, the make check machinery will attempt to create files with those characters in the name. That is inconvenient. 3. It is relatively expensive to fire off a process to fix a source file, therefore write apply tests to avoid unnecessary fix processes. The preferred apply tests are select, bypass, mach -and c-test because they are performed internally: +sum, and c-test because they are performed internally: * select - Run a regex on the contents of the file being considered. All such regex-es must match. Matching is done with extended regular expressions. * bypass - Run a regex on the contents of the file being considered. No such regex may match. +* sum- Select a specific version of a file that has a matching + check sum. The BSD version of checksum [sum(1BSD)] + is used. Each sum entry should contain exactly three + space separated tokens: the sum, some number and the + basename of the file. The some number is ignored. + * c_test - call a function in fixtests.c. See that file. * files - the fnmatch pattern of the file(s) to examine for the issue. There may be several copies of this attribute. If the header lives in a /usr/include subdirectory, be sure to include that subdirectory in the name. e.g. net/if.h * mach - Match the output of config.guess against a series of fnmatch patterns. It must match at least one of the patterns, unless Index: fixincludes/fixincl.c === --- fixincludes/fixincl.c (revision 218991) +++ fixincludes/fixincl.c (working copy) @@ -591,18 +591,71 @@ if (p_test-p_test_regex == 0) fprintf (stderr, fixincl ERROR RE not compiled: `%s'\n, p_test-pz_test_text); #endif if (xregexec (p_test-p_test_regex, pz_data, 0, 0, 0) == 0) return APPLY_FIX; return SKIP_FIX; } +/* * * * * * * * * * * * * + + cksum_test check the sum of the candidate file + Input: the original file contents and the file name + Result: APPLY_FIX if the check sum matches, SKIP_FIX otherwise + + The caller may
Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
On 01/29/15 05:38, Rainer Orth wrote: So I saw. If all else fails, we can still commit the (ugly/hard to read) initial version, otherwise libgo won't build on Solaris before some (quite recent) Solaris 11.2 patch, breaking bootstrap. Having it work at all seems like a nice feature. I think that: test-text = _EOF_ [[]] _EOF_; is likely still better than the quoted string, though. Without the little hyphen (-), the leading tabs are not stripped. At this point, whatever is easiest for you. :)
Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
Hi Rainer, Sorry for the long delay. Anyway: On 01/28/15 06:12, Rainer Orth wrote: * In test_text, I had to backslash-escape the trailing \, otherwise they were eaten up. Whether or not I do this makes no difference for the generated fixincl.x, but only with the escaping does make check pass. Right. It likely gets massaged by a shell script somewhere. Line 88 of check.tpl: 88 cat [= (raw-shell-str (if (exist? files) (get files[0]) testing.h)) 89 =] _HACK_EOF_ 90 91 92 #if defined( [=(. HACK)=]_CHECK ) 93 [=test_text=] 94 #endif /* [=(. HACK)=]_CHECK */ 95 _HACK_EOF_ By quoting the _HACK_EOF_ delimiter on line 89, the shell will not try to process the test_text. This is certainly something that needs to be decided: if we go this route, we should bump the autogen version requirement in install.texi (to whatever is necessary to support the TAB\ magic). I think Debian stable has moved up to 5.18.2, if I am remembering correctly. It's a year old (last fall). I think that is old enough to have been spread around by now. It's your call ultimately. OK, let's bump the defined requirement to something (almost) in this decade, even if (for the moment) we don't use the TAB\ magic: rel5.9.8/16-May-2009
Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
On 01/28/15 10:13, Bruce Korb wrote: Hi Rainer, Sorry for the long delay. Anyway: On 01/28/15 06:12, Rainer Orth wrote: * In test_text, I had to backslash-escape the trailing \, otherwise they were eaten up. Whether or not I do this makes no difference for the generated fixincl.x, but only with the escaping does make check pass. Right. It likely gets massaged by a shell script somewhere. Line 88 of check.tpl: Oh, line 59 too: 59 cat [=(. sfile)=] _HACK_EOF_ 60 61 62 #if defined( [=(. HACK)=]_CHECK_[=(for-index)=] ) 63 [=test_text=] 64 #endif /* [=(. HACK)=]_CHECK_[=(for-index)=] */ 65 _HACK_EOF_
Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
On 01/28/15 10:15, Bruce Korb wrote: On 01/28/15 10:13, Bruce Korb wrote: Hi Rainer, Sorry for the long delay. Anyway: On 01/28/15 06:12, Rainer Orth wrote: * In test_text, I had to backslash-escape the trailing \, otherwise they were eaten up. Whether or not I do this makes no difference for the generated fixincl.x, but only with the escaping does make check pass. Right. It likely gets massaged by a shell script somewhere. Line 88 of check.tpl: Oh, line 59 too: 59 cat [=(. sfile)=] _HACK_EOF_ 60 61 62 #if defined( [=(. HACK)=]_CHECK_[=(for-index)=] ) 63 [=test_text=] 64 #endif /* [=(. HACK)=]_CHECK_[=(for-index)=] */ 65 _HACK_EOF_ I kicked off a test. It is not as simple as quoting the sentinel. I'll dig into it when I can. features.h /u/gnu/proj/gcc-svn-bld/fixincludes/tests/base/features.h differ: char 318, line 13 *** features.h Wed Jan 28 11:26:38 2015 --- /u/gnu/proj/gcc-svn-bld/fixincludes/tests/base/features.h Sat Dec 6 06:10:29 2014 *** *** 10,17 #if defined( GLIBC_C99_INLINE_1_CHECK ) ! #if __GNUC_PREREQ (2, 7) defined __OPTIMIZE__ \ ! !defined __OPTIMIZE_SIZE__ !defined __NO_INLINE__ (defined __extern_inline || defined __GNUC_GNU_INLINE__) # define __USE_EXTERN_INLINES 1 #endif #endif /* GLIBC_C99_INLINE_1_CHECK */ --- 10,16 #if defined( GLIBC_C99_INLINE_1_CHECK ) ! #if __GNUC_PREREQ (2, 7) defined __OPTIMIZE__ !defined __OPTIMIZE_SIZE__ !defined __NO_INLINE__ # define __USE_EXTERN_INLINES 1 #endif #endif /* GLIBC_C99_INLINE_1_CHECK */ This should be fixed by changing the base version.
Re: [fixincludes] Fix iso/math_c99.h signbit on Solaris
On Mon, Feb 9, 2015 at 3:30 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: That worked fine indeed and is considerably more readable than my previous version. Excellent! Thank you. It produced the identical fixincl.x, passed fixincludes make check and Solaris 10 and 11 bootstraps. Ok for mainline now, I guess? That's a really good guess. :)
Re: [PATCH, fixincludes] Fix PR 48009 53348
Looks good to me. On Sun, Feb 15, 2015 at 12:49 PM, David Edelsohn dje@gmail.com wrote: The stdlib.h header in AIX 4.3 does not correctly declare strtof with a const char* argument. Users are building the latest releases of GCC on AIX 4.3 The appended patch from Richard G Daniel uses fixincludes to correct the declaration. Okay? Thanks, David PR bootstrap/48009 PR bootstrap/53348 * inclhack.def (aix_strtof_const): New fix. * fixincl.x: Regenerate. * tests/base/inttypes.h: New test. Index: inclhack.def === --- inclhack.def(revision 220717) +++ inclhack.def(working copy) @@ -842,6 +842,18 @@ }; /* + * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument. + */ +fix = { +hackname = aix_strtof_const; +files = stdlib.h; +select= ((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\); ; +c_fix = format; +c_fix_arg = %1(const char *, char **);; +test_text = extern floatstrtof(char *, char **);; +}; + +/* * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline * in an otherwise harmless (and #ifed out) macro definition */
Re: [patch 3/28] fixincludes: Use automake-1.11.6 (across the tree)
On 05/06/15 01:58, Michael Haubenwallner wrote: Trivial patch for fixincludes. A) sufficiently trivial that explicit permission ought not be required B) it is now officially blessed that we can coalesce year lists. Let's do so, okay? Am 2015-05-05 um 18:03 schrieb Michael Haubenwallner: Hello build machinery maintainers, BTW, the actual commands I use to re-run automake for everything (I found) is: $ export AUTOMAKE='automake-1.11 --add-missing --copy --force-missing' $ /src/gcc-trunk/configure --prefix=/install \ --enable-languages=c,c++,fortran,go,java,lto,objc,obj-c++ \ --enable-liboffloadmic=target \ --enable-libmpx \ --enable-maintainer-mode
Re: [PATCH, fixincludes] AIX headers and extern C
OK. You might consider updating autogen. It seems 5.18 doesn't handle the version test quite right. Any 5.18.n should do fine. I guess I didn't test the version test with older versions. :) On Thu, May 21, 2015 at 6:58 AM, David Edelsohn dje@gmail.com wrote: The AIX port of GCC is one of the few ports that does not define NO_IMPLICIT_EXTERN_C. A user reported a problem that we tracked to an AIX header that explicitly used C++ features (bracketed by #ifdef __cplusplus). AIX headers have included some C++ features, mostly protected by #if defined (__cplusplus) defined (__IBMCPP__) but a few only by __cplusplus. Because of the way the particular header is structured, adding a test for __IBMCPP__ causes other problems. At the encouragement of Jonathan (implicit extern C is an abomination) Wakely, I tried to bootstrap GCC with NO_IMPLICIT_EXTERN_C defined on AIX. That failed horribly. Some AIX headers use C++ features while others are not C++ safe. Sigh. This patch adds a new fix to wrap the failing AIX headers necessary for GCC bootstrap in extern C. I can bootstrap with NO_IMPLICIT_EXTERN_C defined. I don't see clear way to discover which of the headers are C++ safe and which are not if there is no clear intention from IBM AIX Brand to make the headers C++ safe. I don't see a robust and low-risk way to enable NO_IMPLICIT_EXTERN_C on AIX. So, this patch also adds an extern C++ block around the C++ code in sys/socket.h that caused the initial failure. I could not find other headers that used C++ features without __IBMCPP__. Bootstrapped on powerpc-ibm-aix7.1.0.0. Okay? Thanks, David * inclhack.def (aix_externc): New fix. (aix_externcpp[12]): New fix. * fixincl.x: Regenerate. * test/base/ctype.h [AIX_EXTERNC_CHECK]: New test. * test/base/sys/socket.h [AIX_EXTERNCPP[12]_CHECK]: New test. * test/base/fcntl.h: New file.
Re: [PATCHv2] [fixincludes] Ignore .DS_Store junk files when running make check
Definitely much better. I won't apply it until the weekend, so someone else will likely beat me to it. Thank you. On Mon, Jul 27, 2015 at 7:36 PM, Eric Gallager eg...@gwmail.gwu.edu wrote: On 7/27/15, Andreas Schwab sch...@linux-m68k.org wrote: Eric Gallager eg...@gwmail.gwu.edu writes: Okay, I tried embedding ! -name CVS/ ! -name .svn/ into the find
Re: [PATCH, FIXINCLUDES] AIX stdio C++ inline fix
Looks good to me... On Thu, Aug 13, 2015 at 10:33 AM, David Edelsohn dje@gmail.com wrote: AIX stdio.h header includes code specific for C++ that looks like: extern C { #ifdef __cplusplus #ifdef ferror #undef ferror inline int ferror(FILE * _p) { return ((_p)-_flag _IOERR); } #endif /*ferror*/ which generates code that makes the AIX linker and loader rather upset because the inline function is not mangled and conflicts with the C library. This fixincludes patch protects this code with an addition test for IBMCPP (not that IBMCPP will use GCC include-fixed headers, but ). Okay? Thanks, David * inclhack.def (aix_stdio_inline): New fix. * fixincl.x: Regenerated. * test/base/stdio.h [AIX_STDIO_INLINE]: New test. Index: inclhack.def === --- inclhack.def(revision 226860) +++ inclhack.def(working copy) @@ -892,10 +892,32 @@ }; /* + * stdio.h on AIX defines ferror, clearerr and feof as C++ inline, which + produces wrong code with G++. + */ +fix = { +hackname = aix_stdio_inline; +mach = *-*-aix*; +files = stdio.h; +select= #ifdef __cplusplus\\\n +}\\\n\\\n +#ifdef ferror\\\n; +c_fix = format; +c_fix_arg = #ifdef __cplusplus\n +}\n +#endif\n\n +#if (defined(__cplusplus) defined(__IBMCPP__))\n +#ifdef ferror\n; +test_text = #ifdef __cplusplus\n}\n\n#ifdef ferror; +}; + + +/*
Re: [PATCH,FIXINCLUDES] AIX stdlib.h #define malloc
BTW, OK by me :) Now that I'm retired, it is starting to look like less time for this stuff... ;) On Thu, Jun 9, 2016 at 10:25 AM, David Edelsohnwrote: > Index: inclhack.def > === > --- inclhack.def(revision 237258) > +++ inclhack.def(working copy)
Re: [committed] Fix declaration of vsscanf on hpux
On 01/31/16 17:03, John David Anglin wrote: The attached hack fixes missing const from the first argument of the declararation for vsscanf on hpux. Approved for all active dev branches.
Re: [PATCH] New hpux fix to add noreturn attribute to longjmp declarations in setjmp.h
Looks good to me. On Sat, Aug 13, 2016 at 9:55 AM, John David Anglinwrote: > Currently, trunk fails to boot fortran on hpux because of the following error: > > /xxx/gnu/gcc/objdir/./prev-gcc/xg++ -B/xxx/gnu/gcc/objdir/./prev-gcc/ > -B/opt/gnu64/gcc/gcc-7/hppa64-hp-hpux11.00/bin/ -nostdinc++ > -B/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/src/.libs > -B/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/libsupc++/.libs > -I/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11 > .00/libstdc++-v3/include/hppa64-hp-hpux11.00 > -I/xxx/gnu/gcc/objdir/prev-hppa64- > hp-hpux11.00/libstdc++-v3/include -I/xxx/gnu/gcc/gcc/libstdc++-v3/libsupc++ > -L/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/src/.libs > -L/xxx/gnu/gc > c/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/libsupc++/.libs -fno-PIE -c > -DIN > _GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti > -fasynchronous-unwin > d-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual > -Wmissing-format-at > tribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros > -Wno- > overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -Ifortran > -I../../gc > c/gcc -I../../gcc/gcc/fortran -I../../gcc/gcc/../include > -I../../gcc/gcc/../libc > pp/include -I/opt/gnu64/gcc/gmp/include -I../../gcc/gcc/../libdecnumber > -I../.. > /gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace > -o fortran/parse.o -MT fortran/parse.o -MMD -MP -MF fortran/.deps/parse.TPo > ../ > ../gcc/gcc/fortran/parse.c > ../../gcc/gcc/fortran/parse.c: In function 'void unexpected_eof()': > ../../gcc/gcc/fortran/parse.c:2618:1: error: 'noreturn' function does return > [-W > error] > > The attached patch fixes the above by adding the noreturn attribute to the > "longjmp" declarations in setjmp.h. > > Okay for trunk? > > Dave > -- > John David Anglin dave.ang...@bell.net >
Re: Implement -Wswitch-fallthrough: rs6000
On Wed, Jul 13, 2016 at 11:39 AM, Marek Polacekwrote: > Most likely what you saw was in cxx_pretty_printer::declaration_specifiers. I only saw it once and, of course, it was once too often. ;) If you fix it, it would sooth my sensibilities as the fixincludes maintainer, making mine a small voice in the GCC world. Still, for what it's worth, I'd back you :) Cheers - Bruce
Re: Implement -Wswitch-fallthrough: rs6000
> On Mon, Jul 11, 2016 at 01:36:02PM -0700, Bruce Korb wrote: > [[putrid code deleted]] >> Does this patch mean that the above got fixed? I mean, if you're >> going to fret over linguistic tags to make falling through explicit, >> it would seem the above code is pretty sore-thumby, yes? > > My current implementation warns here, but the warning can be suppressed > by adding /* FALLTHRU */ or __builtin_fallthrough(); before the > do_something_else() line. > > Does that answer your question? Not in a satisfying way. :) I understand that syntactically, you can drop a "case" in wherever you can drop a statement label. That doesn't mean you should. Since I wasn't fixing GCC code, I just rolled my eyes and moved on. However, if the code is going to be changed, then contortions like that ought to be addressed. Both for aesthetics and for code clarity.