This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] AutoFDO patch for trunk
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Dehao Chen <dehao at google dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Li <davidxl at google dot com>
- Date: Wed, 22 Oct 2014 17:19:06 +0200
- Subject: Re: [PATCH] AutoFDO patch for trunk
- Authentication-results: sourceware.org; auth=none
- References: <CAO2gOZXmUY4RtO71PB0y2kVf0h2tCY9J8P4cirXnB-_8yDYuNQ at mail dot gmail dot com> <20140515210430 dot GB29194 at kam dot mff dot cuni dot cz> <CAO2gOZVEqf=atkVs8x99b6xoHHEQtFp0m1sDsVAohAEcSpT4MA at mail dot gmail dot com> <20141014150215 dot GA25780 at kam dot mff dot cuni dot cz> <CAO2gOZWLbyp7hiUaRv17t9BmiNL55LHb+b9p_t1GZnxmregAcA at mail dot gmail dot com> <CAO2gOZUGFE2E8b8qGZjpG83grRYmXsHUAN67z6-kstUjB08FxA at mail dot gmail dot com> <20141015142840 dot GB11581 at atrey dot karlin dot mff dot cuni dot cz> <CAO2gOZX7QE6HMxcoemaUtHUGNCz2Yin110fh_uhyvc8L3_HFhg at mail dot gmail dot com> <20141019095826 dot GB14852 at kam dot mff dot cuni dot cz> <CAO2gOZXMF1LHf9DfCc_y3Pbhm2btM0bK8012APDK8ROxLiW6gg at mail dot gmail dot com>
Dehao Chen <dehao@google.com> writes:
> The updated patch attached. Will commit the patch in 2~3 hours if no
> objection is received.
Apart from the AIX bootstrap failure your patch introduced, it also
breaks Solaris bootstrap:
In file included from ./config.h:6:0,
from /vol/gcc/src/hg/trunk/local/gcc/auto-profile.c:25:
./auto-host.h:1976:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/iso/string_iso.h:24:0,
from /usr/include/string.h:11,
from /vol/gcc/src/hg/trunk/local/gcc/auto-profile.c:21:
/var/gcc/regression/trunk/11-gcc/build/prev-gcc/include-fixed/sys/feature_tests.h:213:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
As Joseph is repeating over and over again, *nothing* must be included
before config.h, and auto-profile.c violates this.
The following patch at least allows the file to compile without errors;
no idea if this the best order for the headers involved.
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -18,12 +18,13 @@ You should have received a copy of the G
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#include "config.h"
+#include "system.h"
+
#include <string.h>
#include <map>
#include <set>
-#include "config.h"
-#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-pass.h"
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University