Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-27-2003
rodrigc rodrigc is offline
Registered User
 
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 27
Minor i386 fixes

Hi,

Here is a patch for some minor i386 fixes.

include/Ice/Config.h:
- removed check for i386.
- it is unnecessary because the header files protected in that block are present
on all architectures

include/IceUtil/Config.h:
- moved check for i386 around SIZEOF_WCHAR_T
- defining HAVE_READLINE should not be determined whether i386 is defined
or not

You are mixing up two things:
- definition of a platform such as Linux or FreeBSD
- definition of an architecture, such as i386, sparc, etc.


Both Linux and FreeBSD are capable of running on multiple architectures.

Thanks.
Attached Files
File Type: txt patches-1.txt (1.0 KB, 229 views)
__________________
--
Craig Rodrigues
Reply With Quote
  #2 (permalink)  
Old 03-07-2003
fmccor fmccor is offline
Registered User
 
Name: Ferris McCormick
Organization: Alpha Informatics, Ltd
Project: Evaluation (Gentoo Linux)
 
Join Date: Feb 2003
Location: Northern Virginia
Posts: 15
Also, in src/icecpp/
in the file src/icecpp/config.h at line 55, you should insert something like

#elif (defined(__sparc__) || defined(__sparc64__) || defined(__sparc_v9__))
# define WCHAR_TYPE_SIZE 4

at least, this is what you need for sparc+gcc, either linux/sparc or solaris/sparc.
I don't know about solaris/sparc+sun native compiler.
__________________
--
Ferris McCormick
Reply With Quote
  #3 (permalink)  
Old 03-07-2003
rodrigc rodrigc is offline
Registered User
 
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 27
Ferris,

If I do CC -v a.cc with the Sun compiler with this version of the compiler:
CC: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11


This is what gets invoked:

================================================== =================
/opt/SUNWspro6/bin/../WS6U1/bin/ccfe -y-o -ya.o -y-fbe -y/opt/SUNWspro6/bin/../WS6U1/bin/fbe -y-xarch=generic -y-verbose -O0 -ptf /tmp/01265%1.%2 -ptx /opt/SUNWspro6/bin/../WS6U1/bin/CC -ptk "-v -xs " -D__SunOS_5_6 -D__SUNPRO_CC=0x520 -Dunix -Dsun -Dsparc -D__sparc -D__unix -D__sun -D__BUILTIN_VA_ARG_INCR -D__SVR4 -D__SUNPRO_CC_COMPAT=5 -y-s -instlib=/opt/SUNWspro6/WS6U1/lib/libCstd.a -I/opt/SUNWspro6/WS6U1/include/CC/Cstd -I/opt/SUNWspro6/WS6U1/include/CC -I/opt/SUNWspro6/WS6U1/include/CC/rw7 -I/opt/SUNWspro6/WS6U1/include/cc -D__SUN_PREFETCH a.cc -s /tmp/ccfe.01265.0.s
rm /tmp/ccfe.01265.0.s
/opt/SUNWspro6/bin/../WS6U1/bin/CClink -ptk "-v -xs -xildoff " -ptx /opt/SUNWspro6/bin/../WS6U1/bin/CC a.o -o a.out
### CC: Note: LD_LIBRARY_PATH = /opt/ACE_wrappers/latest/ace:/usr/local/quo/home/gduzan/test/rh71/omni/lib/i586_linux_2.0_glibc2.1
### CC: Note: LD_RUN_PATH = (null)
### CC: Note: LD_OPTIONS = (null)
/usr/ccs/bin/ld -u __1cH__CimplKcplus_init6F_v_ -R/opt/SUNWspro6/lib/rw7:/opt/SUNWspro6/lib:/opt/SUNWspro/lib:/usr/ccs/lib:/usr/lib -o a.out /opt/SUNWspro6/WS6U1/lib/crti.o /opt/SUNWspro6/WS6U1/lib/crt1.o /opt/SUNWspro6/WS6U1/lib/values-xa.o -Y P,/opt/SUNWspro6/lib/rw7:/opt/SUNWspro6/lib:/opt/SUNWspro6/WS6U1/lib/rw7:/opt/SUNWspro6/WS6U1/lib:/usr/ccs/lib:/usr/lib /home/crodrigu/SunWS_cache/CC_obj_4/4DEFt4W9tB0o97_lSrDf.o a.o -lCstd -lCrun -lm -lw -lcx -lc /opt/SUNWspro6/WS6U1/lib/crtn.o >&/tmp/ld.01268.0.err
================================================== ==================


So I think checking for #if defined(__sparc) is what you want.
__________________
--
Craig Rodrigues
Reply With Quote
  #4 (permalink)  
Old 03-07-2003
fmccor fmccor is offline
Registered User
 
Name: Ferris McCormick
Organization: Alpha Informatics, Ltd
Project: Evaluation (Gentoo Linux)
 
Join Date: Feb 2003
Location: Northern Virginia
Posts: 15
Actually, you have to add that to the list, I guess, for the Sun compiler. Latest
gcc(=gcc3.2.1) on sparc/linux defines __sparc__ but not __sparc:

For the file c.c

#ifndef __sparc
#error no '__sparc'
#endif

you get:

ferris@lacewing:~/DOCS/LAW [247]% gcc -c -v c.c
Reading specs from /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.1/specs
Configured with: /var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/configure --prefix=/usr --bindir=/usr/sparc-unknown-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.1/include --datadir=/usr/share/gcc-data/sparc-unknown-linux-gnu/3.2 --mandir=/usr/share/gcc-data/sparc-unknown-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/sparc-unknown-linux-gnu/3.2/info --enable-shared --host=sparc-unknown-linux-gnu --target=sparc-unknown-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.1/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --disable-nls
Thread model: posix
gcc version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)
/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.1/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__sparc__ -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__sparc__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=unix -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc c.c -quiet -dumpbase c.c -version -o /tmp/cc6XYmZX.s
GNU CPP version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207) (cpplib) (sparc GNU/Linux with ELF)
GNU C version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207) (sparc-unknown-linux-gnu)
compiled by GNU C version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207).
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.1/include
/usr/sparc-unknown-linux-gnu/include
/usr/include
End of search list.
c.c:2:2: #error no '__sparc'

So, no '__sparc'
Of course, for consistency, with gcc2.95.2 on Solaris, gcc gives you -D__sparc

I suppose
#if defined(sparc) || defined(__sparc) || defined(__sparc__)
would get everything...
__________________
--
Ferris McCormick
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Patch #1 for Ice 3.1.1: fixes IceGrid locator memory corruption benoit Patches 0 11-06-2006 04:26 AM
Patch #7 for Ice 3.1.0: IceGridGUI fixes bernard Patches 0 09-11-2006 02:28 PM
g++ 4.1 compilation fixes for IceE 1.1.0 fmoya Bug Reports 1 04-13-2006 08:32 AM
Minor typos in Ice 3.0.1 manual bartley Comments 0 02-14-2006 02:46 PM
A (very) minor gift as a thank you! SteveWampler Patches 2 01-21-2004 08:52 AM


All times are GMT -4. The time now is 10:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.