public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: nils@shkoo.com
To: gcc-gnats@gcc.gnu.org
Subject: other/5450: __i386__ not defined on unixsware
Date: Mon, 21 Jan 2002 22:06:00 -0000	[thread overview]
Message-ID: <200201220556.FAA03166@rapture.touchtone.org.touchtone.org> (raw)


>Number:         5450
>Category:       other
>Synopsis:       __i386__ not defined on unixsware
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 21 22:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.0.3
>Organization:
>Environment:
System: UNIX_SV rapture 4.2MP 2.01 i386 x86at


	<machine, os, target, libraries (multiple lines)>
host: i386-pc-sysv4.2uw2.01
build: i386-pc-sysv4.2uw2.01
target: i386-pc-sysv4.2uw2.01
configured with: ./configure --with-gnu-as --with-gnu-ld
>Description:
	__i386__ not defined via specs file.

	__i386__ present in *cpp_cpu: section, but apparently this doesn't get
sent to the preprocessor command line.

	this causes problems with <sys/byteorder.h> which thinks the intel box is BIG_ENDIAN
	because __i386__ is not defined

>How-To-Repeat:

nils@rapture$ uname -a
UNIX_SV rapture 4.2MP 2.01 i386 x86at
nils@rapture$ cat testit.cc
#ifdef __i386__
i386 defined
#else
i386 undefined
#endif
nils@rapture$ gcc -v -E testit.cc
Reading specs from /usr/local/lib/gcc-lib/i386-pc-sysv4.2uw2.01/3.0.3/specs
Configured with: ./configure --with-gnu-as --with-gnu-ld
Thread model: single
gcc version 3.0.3
 /usr/local/lib/gcc-lib/i386-pc-sysv4.2uw2.01/3.0.3/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSIO
N=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=3 -Dunix -D__svr4__ -D__unix__ -D__svr4__ -D__unix -Asystem=unix -Asy
stem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 testit.cc
GNU CPP version 3.0.3 (cpplib) (i386 System V Release 4)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i386-pc-sysv4.2uw2.01
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i386-pc-sysv4.2uw2.01/3.0.3/include
 /usr/local/i386-pc-sysv4.2uw2.01/include
 /usr/include
End of search list.
# 4 "testit.cc"
i386 undefined
nils@rapture$ cat /usr/local/lib/gcc-lib/i386-pc-sysv4.2uw2.01/3.0.3/specs
*asm:
--traditional-format %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}

*asm_final:
%|

*asm_options:
%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!S:-o %{|!pipe:%g.s} |
 as %(asm_options) %{!pipe:%g.s} %A }

*cpp:


*cpp_options:
%{C:%{!E:%eGNU C does not support -C without using -E}} %{std*} %{nostdinc*} %{C} %{v} %{I*} %{P} %{$} %I %{MD:-M -MF %W{!o: %b.d}%W{o*:%.d%*}} %{MMD:-MM -MF %W{!o: %b.d}%W{o*:%.d%*}} %{M} %{MM} %W{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{M|MD|MM|MMD:%{o*:-MQ %*}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__} %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\ unsigned\ int} %{ffreestanding:-D__STDC_HOSTED__=0} %{fno-hosted:-D__STDC_HOSTED__=0} %{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}} %{fshow-column} %{fno-show-column} %{fleading-underscore} %{fno-leading-underscore} %{fno-operator-names} %{ftabstop=*} %{remap} %{g3:-dD} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*&U*&A*} %{i*} %Z %i %{E:%{!M*:%W{o*}}}

*trad_capable_cpp:
%{traditional|ftraditional|traditional-cpp:trad}cpp0

*cc1:
%(cc1_cpu)

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*} %{ansi} %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*}

*cc1plus:


*endfile:
crtend.o%s %{pg:gcrtn.o%s}%{!pg:crtn.o%s}

*link:
%{h*} %{v:-V}              %{b} %{Wl,*:%*}                 %{static:-dn -Bstatic}                  %{shared:-G -dy -z text}                %{symbolic:-Bsymbolic -G -dy -z text}                   %{G:-G}                 %{YP,*}                 %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib}                  %{!p:-Y P,/usr/ccs/lib:/usr/lib}}              %{Qy:} %{!Qn:-Qy}

*lib:
%{!shared:%{!symbolic:-lc}}

*libgcc:
-lgcc

*startfile:
%{!shared:                       %{!symbolic:                     %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}                  %{pg:gcrti.o%s}%{!pg:crti.o%s}                  %{ansi:values-Xc.o%s}                   %{!ansi:                         %{traditional:values-Xt.o%s}                    %{!traditional:values-Xa.o%s}}                         crtbegin.o%s

*switches_need_spaces:


*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}

*predefines:
-Dunix -D__svr4__ -Asystem=unix -Asystem=svr4

*cross_compile:
0

*version:
3.0.3

*multilib:
. ;

*multilib_defaults:


*multilib_extra:


*multilib_matches:


*multilib_exclusions:


*linker:
collect2

*link_libgcc:
%D

*md_exec_prefix:
/usr/ccs/bin/

*md_startfile_prefix:
/usr/ccs/lib/

*md_startfile_prefix_1:


*cpp_cpu_default:
-D__tune_i386__

*cpp_cpu:
-Acpu=i386 -Amachine=i386 %{!ansi:%{!std=c*:%{!std=i*:-Di386}}} -D__i386 -D__i386__ %{march=i386:%{!mcpu*:-D__tune_i386__ }}%{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}%{march=pentium|march=i586:-D__i586 -D__i586__ -D__pentium -D__pentium__   %{!mcpu*:-D__tune_i586__ -D__tune_pentium__ }}%{march=pentiumpro|march=i686:-D__i686 -D__i686__   -D__pentiumpro -D__pentiumpro__   %{!mcpu*:-D__tune_i686__ -D__tune_pentiumpro__ }}%{march=k6:-D__k6 -D__k6__ %{!mcpu*:-D__tune_k6__ }}%{march=athlon:-D__athlon -D__athlon__ %{!mcpu*:-D__tune_athlon__ }}%{m386|mcpu=i386:-D__tune_i386__ }%{m486|mcpu=i486:-D__tune_i486__ }%{mpentium|mcpu=pentium|mcpu=i586:-D__tune_i586__ -D__tune_pentium__ }%{mpentiumpro|mcpu=pentiumpro|mcpu=i686:-D__tune_i686__ -D__tune_pentiumpro__ }%{mcpu=k6:-D__tune_k6__ }%{mcpu=athlon:-D__tune_athlon__ }%{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}

*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 %n`-m386' is deprecated. Use `-march=i386' or `-mcpu=i386' instead.
} %{m486:-mcpu=i486 %n`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
} %{mpentium:-mcpu=pentium %n`-mpentium' is deprecated. Use `-march=pentium' or `-mcpu=pentium' instead.
} %{mpentiumpro:-mcpu=pentiumpro %n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mcpu=pentiumpro' instead.
}}

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}    %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}




>Fix:
	worked around by adding -D__i386__ to *predefines: section in spec file
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-01-22  6:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-21 22:06 nils [this message]
2002-01-21 23:13 rodrigc
2002-01-22  2:56 nils
2002-01-22 15:04 rodrigc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200201220556.FAA03166@rapture.touchtone.org.touchtone.org \
    --to=nils@shkoo.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).