Bug 9877 - fixincl makes a bad sys/byteorder.h on svr5 (UnixWare 7.1.1)
Summary: fixincl makes a bad sys/byteorder.h on svr5 (UnixWare 7.1.1)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: 3.3.2
Assignee: Kean Johnston
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2003-02-27 14:46 UTC by john
Modified: 2003-08-24 04:03 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-UnixWare7.1.1-sysv5
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-05-26 19:16:05


Attachments
Proposed patch for 3.3 (450 bytes, patch)
2003-08-04 07:13 UTC, Kean Johnston
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description john 2003-02-27 14:46:00 UTC
The sys/byteorder.h created by fixincl has multi-line
strings in an asm.  This is now treated as an error:

Reading specs from /u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/specs
Configured with: ../gcc-20030224/configure --host=i686-UnixWare7.1.1-sysv5 --prefix=/u/local/new --with-local_prefix=/u/local/new
Thread model: single
gcc version 3.3 20030224 (prerelease)
 /u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 zz.c -quiet -dumpbase zz.c -auxbase zz -version -o /var/tmp//ccbIWxqM.s
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C version 3.3 20030224 (prerelease) (i686-UnixWare7.1.1-sysv5)
        compiled by GNU C version 3.3 20030224 (prerelease).
ignoring nonexistent directory "/u/local/new/i686-UnixWare7.1.1-sysv5/include"
#include "..." search starts here:
#include <...> search starts here:
 /u/local/new/include
 /u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/include
 /usr/include
End of search list.
In file included from zz.c:1:
/u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/include/sys/byteorder.h:59:12: missing terminating " character
In file included from zz.c:1:
/u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/include/sys/byteorder.h: In function `htonl':
/u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/include/sys/byteorder.h:60: error: syntax error before "ror"
/u/local/new/lib/gcc-lib/i686-UnixWare7.1.1-sysv5/3.3/include/sys/byteorder.h:61:48: missing terminating " character

Release:
gcc-3.3 snapshot  gcc-20030224

Environment:
UnixWare 7.1.1 (probably any svr4 based system)
Comment 1 john 2003-02-27 14:46:00 UTC
Fix:
This patch fixes the problem:

--- gcc-20030224/gcc/fixinc/fixincl.x.orig      Fri Feb 14 05:34:35 2003
+++ gcc-20030224/gcc/fixinc/fixincl.x   Thu Feb 27 14:56:38 2003
@@ -393,8 +393,8 @@
 htonl (unsigned long __arg)\n\
 {\n\
   register unsigned long __result;\n\n\
-  __asm__ (\"xchg%B0 %b0,%h0\n\
-\tror%L0 $16,%0\n\
+  __asm__ (\"xchg%B0 %b0,%h0\\n\\\n\
+\tror%L0 $16,%0\\n\\\n\
 \txchg%B0 %b0,%h0\" : \"=q\" (__result) : \"0\" (__arg));\n\
   return __result;\n\
 }\n\n\
Comment 2 Dara Hazeghi 2003-05-26 19:13:06 UTC
Hello,

I can confirm that this problem is still present in gcc 3.3 branch sources.

Dara
Comment 3 Andrew Pinski 2003-05-26 19:16:05 UTC
See Dara's comment, is it a problem in 3.4 (mainline)?
Comment 4 Dara Hazeghi 2003-05-26 19:21:17 UTC
I verified that this problem is still present on mainline. Kean, do you think you can take a look at 
the patch here, and if it is correct, apply it to 3.3, and a similar one to 3.4? Thanks,

Dara
Comment 5 Andrew Pinski 2003-05-26 19:29:55 UTC
See Dara's question, Also please post your patch to gcc-patches@gcc.gnu.org.
Comment 6 Kean Johnston 2003-05-26 22:22:03 UTC
Visual inspection of the patch looks good, but I am doing a bootstrap on the 3.3
branch for safety, and will then get bkorb to ok the commit (since he owns fixinc)
Comment 7 Kean Johnston 2003-05-26 22:26:36 UTC
PS. How come I cant assign this bug to myself? I am bugzilla challenged :)
Comment 8 Kean Johnston 2003-08-04 07:13:58 UTC
Created attachment 4559 [details]
Proposed patch for 3.3

Please try this against 3.3 and see if it works for you.
Comment 9 Andrew Pinski 2003-08-24 04:03:44 UTC
Was fixed by:

2003-08-08  Kean Johnston

        PR target/9877
        PR target/8336
        * config.gcc (sco3.2v5*): Use elfos.h and dbxelf.h in tm_file;
        Eliminate need for t-sco5gas target fragment.
        No longer build crt{begin,end}S.o, that were used for COFF support.
        * tlink.c (recompile_files): Add missing = in putenv() calls.
        * unwind-dw2.c (_Unwind_GetCFA): Correct return cast.      
        * config/i386/sco5.h: Major overhaul to remove all COFF support  
        * config/i386/t-sco5: Multilib for PIC support
        * config/i386/t-sco5gas: Remove
        * config/i386/i386.c: Check value as well as presence of
        SUPPORTS_ONE_ONLY
        * doc/install.texi: Update for modern SCO instructions
        * fixinc/check.tpl: Allow user to specify diff program for make check
        * fixinc/inclhack.def: Fix several SCO header files, namely string.h,
        math.h, sys/byteorder.h and sys/regset.h.
        * fixinc/fixincl.x: Regenerate
        * fixinc/tests/base/math.h: Update
        * fixinc/tests/base/sys/byteorder.h: Update
        * fixinc/tests/base/string.h: Added 
        * fixinc/tests/base/sys/regset.h: Added
        * testsuite/gcc.dg/nest.c: Allow failure on SCO (-pg not supported)