Issue 13620 - Summary of patches required for AIX port.
Summary: Summary of patches required for AIX port.
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 644
Hardware: Other All
: P5 (lowest) Trivial (vote)
Target Milestone: OOo 2.0
Assignee: foskey
QA Contact: issues@porting
URL:
Keywords:
Depends on: 15631
Blocks:
  Show dependency tree
 
Reported: 2003-04-19 16:19 UTC by foskey
Modified: 2011-07-27 09:37 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
check for types already existing. make AIX buildable. (3.13 KB, patch)
2003-04-19 16:20 UTC, foskey
no flags Details | Diff
aix needs -pthread, this allows for that. (1.43 KB, patch)
2003-04-22 15:06 UTC, foskey
no flags Details | Diff
PTHREAD_LIBS come through properly, add AIX to configure. Mixed with other patches. (40.40 KB, patch)
2003-04-22 15:11 UTC, foskey
no flags Details | Diff
Add hack to configure for gcc on aix (platform specific) (972 bytes, patch)
2003-06-15 15:14 UTC, foskey
no flags Details | Diff
Settings file that must be moved to the config dir before compiling. (2.83 KB, text/plain)
2003-06-15 15:15 UTC, foskey
no flags Details
Revised stlport patch for gcc 3.3 and Beta2 tag. (5.03 KB, patch)
2003-06-16 15:33 UTC, foskey
no flags Details | Diff
PAtch to exclude aix from library include and to make the makefile portable across platforms. (1.36 KB, patch)
2003-06-16 15:48 UTC, foskey
no flags Details | Diff
Tell sablot aix has a unistd.h (664 bytes, patch)
2003-06-17 14:28 UTC, foskey
no flags Details | Diff
enable aix to use gnuc casting. (1.14 KB, patch)
2003-07-28 13:56 UTC, foskey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description foskey 2003-04-19 16:19:59 UTC
The AIX port has begun.  It presents the first oportunity for me to work through
a fairly simple port and make the suite an easier one to port in the future.
Comment 1 foskey 2003-04-19 16:20:37 UTC
Created attachment 5761 [details]
check for types already existing.  make AIX buildable.
Comment 2 foskey 2003-04-20 13:19:37 UTC
STLport failed with a -j option unknown.  Simple patch is to use gnu
make instead.

Index: makefile.mk
===================================================================
RCS file: /cvs/external/stlport/makefile.mk,v
retrieving revision 1.5.6.2.4.1
diff -u -r1.5.6.2.4.1 makefile.mk
--- makefile.mk 20 Feb 2003 15:13:40 -0000      1.5.6.2.4.1
+++ makefile.mk 20 Apr 2003 12:18:34 -0000
@@ -113,7 +113,7 @@
     BUILD_FLAGS=-f gcc.mak
 .ENDIF # "$(OS)"=="MACOSX"
 .ENDIF # "$(COMID)"=="gcc3"
-BUILD_ACTION=make
+BUILD_ACTION=$(GNUMAKE)
 # build in parallel
 BUILD_FLAGS+= -j$(MAXPROCESS)
 .ENDIF
Comment 3 foskey 2003-04-20 14:08:44 UTC
My log of the port that I will write on a daily basis to give an idea
or picture of a port.

http://members.optusnet.com.au/~ooffice/
Comment 4 khendricks 2003-04-20 23:14:02 UTC
Hi, 
 
Ading myself to CC on this. 
 
Also Ken, did you run the alignment test code I once posted.  I can clean it up for 64 bit 
machines if need be. 
 
We will probably have to create a new alignment macro to get structures starting with 
doubles (and/or long long ints) to get things to work properly. 
 
That test code will tell us. 
 
Have fun! 
 
Kevin 
 
Comment 5 foskey 2003-04-22 15:06:49 UTC
Created attachment 5808 [details]
aix needs -pthread, this allows for that.
Comment 6 foskey 2003-04-22 15:11:02 UTC
Created attachment 5809 [details]
PTHREAD_LIBS come through properly, add AIX to configure.  Mixed with other patches.
Comment 7 khendricks 2003-04-22 15:18:07 UTC
Hi Ken,

My mail to you bounced (rejected by your end) so I am putting
the body here since it is relevant to AIX porting:

--snip--

Hi Ken.

This is what I feared.

The problem is that AIX and Darwin both use the same structure
 layout that will somehow align long long ints to 8 but doubles to 4.

So it is not quite MAX4 since long long ints are aligned to 8 and it is
not a full natural alignment since doubles are 8 bytes long but only
aligned to 4.

I specifically asked the gnu gcc team about this and it came about
by evolution (long long int types did not exist) and so they made doubles
align to 4 (which is a real performance penalty) but later on when long long int
types were added they changed their mine and tried to align them more
naturally.

Result is a mixed beastie that is unlike any other processor.

Luckily MacOSX adds the capability to change the layout of structures
with a compiler options -malign-natural that allows the gcc 3 builds
to actually pass all of these tests on MacOSX compiler version.

Unfortunately, the gcc for AIX does not have this option.

So you have two approaches:

1. patch gcc to change the alignment of long long ints to 4
(or alternatively doubles to 8)
(I have a patch that does this for GNU gcc 3.3 for Darwin)

2. Figure out everyplace in the OOo code where a slightly
different version of the  ALIGN macro needs to be put
(where it wasn't before).  In this case you will need to add
an alignment macro everyplace a double is first in the
structure that extends inherits from another structure.

I am sure if we explain all of this on the dev@udk.openoffice.org
mailing list, that someone there will be able to guide us to find the
right places this alignment macro might be needed.

So how do you want to handle this?  I could get you a patch
that you can use to temporarly "fix" gcc so that you can go ahead with
the port using it until we figure out how to change the OOo code.

Just let me know what you think?

Thanks,

Kevin

Comment 8 foskey 2003-05-27 15:21:54 UTC
stlport patch was committed,  it is an improved FREEBSD patch anyway.
Comment 9 Martin Hollmichel 2003-06-02 11:21:47 UTC
I guess, solution is a patched gcc ? how do we want to proceed with
this issue ?
Comment 10 foskey 2003-06-02 13:24:17 UTC
AIX port of openoffice will ONLY support gcc 3.4 and better.  The same
goes for the Mac port which will be gcc 2.95 or gcc 3.4 only.

The port is ongoing but I feel the dmake patch can go live today.
Comment 11 khendricks 2003-06-02 13:48:35 UTC
Hi Ken,  
  
Why gcc 3.4 or better?  Is there some other bug/issue with gcc 3.3?  If not,  we have 
a perfectly valid gcc 3.3 patch and users need not use it, only builders/porters need 
it.  
  
Also why would MacOSX need gcc 3.4?  MacOSX gcc has had the  -malign-natural  
in their tree since gcc 3.1 (that is what the patch was based on!).  BTW: MacOSX  
gcc 3.3 fixes the other problems we have been having with gcc I am told so that 
should be a good compiler to use once MacOSX releases it.   
  
Even Darwin users who may want to use only GNU gcc (not the MacOSX version) 
should be able to use the align_natural  patch to build a compliant pure *GNU* gcc 
3.3 version that will work for both Darwin and MacOSX porting of OOo with gnu gcc 
3.3.  
  
Perhaps a little clarification might help?  Perhaps we should attach both of the  
patches (GNU gcc 3.3 and GNU gcc 3.4 patches to this issue so that they are  
available for other interested AIX porters who want to use gcc 3.3?  
  
My 2 cents,  
  
Kevin  
  
  
I   
Kevin  
  
Comment 12 foskey 2003-06-15 15:14:15 UTC
Created attachment 6894 [details]
Add hack to configure for gcc on aix (platform specific)
Comment 13 foskey 2003-06-15 15:15:19 UTC
Created attachment 6895 [details]
Settings file that must be moved to the config dir before compiling.
Comment 14 foskey 2003-06-16 15:33:56 UTC
Created attachment 6922 [details]
Revised stlport patch for gcc 3.3 and Beta2 tag.
Comment 15 foskey 2003-06-16 15:48:56 UTC
Created attachment 6923 [details]
PAtch to exclude aix from library include and to make the makefile portable across platforms.
Comment 16 foskey 2003-06-17 14:28:57 UTC
Created attachment 6940 [details]
Tell sablot aix has a unistd.h
Comment 17 quetschke 2003-07-25 22:19:45 UTC
Applied
-          ($platform = "AIX") )
+          ($platform eq "AIX") )
to set_soenv.in.
Comment 18 foskey 2003-07-28 13:56:04 UTC
Created attachment 8069 [details]
enable aix to use gnuc casting.
Comment 19 foskey 2003-11-17 12:20:14 UTC
Dropping Priority, unable to work on port at present.
Comment 20 sander_traveling 2004-04-20 18:02:26 UTC
closing - lets please use one issue per cws to track patches
Comment 21 Martin Hollmichel 2005-05-19 11:08:19 UTC
close issue.
Comment 22 pwkutter 2008-07-24 11:23:23 UTC
Hi.
I would like to test your AIX Port in a large enterprise, where the Server
infrastructure is AIX based.

Does anyone know a person who could assist me from a technical point of view.
Both non-commercial proposals, with the idea to bring your port forward, and
commercial proposals, with the idea to sell a few hours of consulting will be
considered.

I have a deep technical know-how in Eclipse Modeling Framework and other Java
technologies, and I could help in that area. Please have a look at my LinkedIn
Profile www.kutter.org for further info.

Best Regards,
Philipp Kutter
Comment 23 taotaosmile 2011-07-27 09:37:16 UTC
Hi,
I'am  happy to find these important patch file,but I don't konw how to use these files. I have never use patch files before.
Could someone tell me ?