Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] [prefix][aix] openssl
Date: Tue, 10 Apr 2007 19:11:45
Message-Id: 20070410191123.GF20922@gentoo.org
1 I applied this thing anyway. I saw I already keyworded the ebuild per
2 accident. Anything linked to this thing yet? Mutt perhaps? Would like
3 it if Mutt would run on AIX ;)
4
5
6 On 30-03-2007 23:03:49 +0200, Michael Haubenwallner wrote:
7 > Hi,
8 >
9 > had some success recently on merging openssl-0.9.8e on aix with attached
10 > patch.
11 >
12 > Although the merge works, I said "some success" because I'm afraid that
13 > the libs are linked in a wrong way: libssl.so does not runtime-depend on
14 > libcrypto.so...
15 >
16 > I'm also unsure if 'thread' configure-flag is interpreted correctly.
17 >
18 > However, we might need to merge some dependant packages to test this,
19 > because private openssl-binary seems to be built statically.
20 >
21 > Another thing to mention:
22 > doing 'emake all rehash' does not work when doing parallel, because
23 > 'rehash' requires openssl-binary built during 'all'.
24 >
25 > Can't say how this works upstream...
26 >
27 > /haubi/
28
29 > Index: files/openssl-0.9.8e-aix.patch
30 > ===================================================================
31 > --- files/openssl-0.9.8e-aix.patch (revision 0)
32 > +++ files/openssl-0.9.8e-aix.patch (revision 0)
33 > @@ -0,0 +1,55 @@
34 > +--- Configure.orig 2007-03-30 14:00:18 +0200
35 > ++++ Configure 2007-03-30 14:10:28 +0200
36 > +@@ -403,7 +403,7 @@
37 > +
38 > + #### IBM's AIX.
39 > + "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
40 > +-"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:",
41 > ++"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
42 > + "aix64-gcc","gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn::::::-X64",
43 > + # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
44 > + # at build time. $OBJECT_MODE is respected at ./config stage!
45 > +--- Makefile.shared.orig 2007-03-30 15:48:17 +0200
46 > ++++ Makefile.shared 2007-03-30 15:49:11 +0200
47 > +@@ -101,7 +101,7 @@
48 > + LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
49 > + SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
50 > + SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
51 > +- nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
52 > ++ nm -Pg $$SHOBJECTS | grep ' [BD] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
53 > + LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
54 > + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
55 > + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
56 > +@@ -485,26 +485,26 @@
57 > +
58 > + link_o.aix:
59 > + @ $(CALC_VERSIONS); \
60 > +- OBJECT_MODE=`expr x$(SHARED_LDFLAGS) : 'x\-[a-z]\([0-9]*\)'`; \
61 > ++ OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]\([0-9]*\)'`; \
62 > + OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
63 > + SHLIB=lib$(LIBNAME).so; \
64 > + SHLIB_SUFFIX=; \
65 > +- ALLSYMSFLAGS='-bnogc'; \
66 > ++ ALLSYMSFLAGS='-Wl,-bnogc'; \
67 > + NOALLSYMSFLAGS=''; \
68 > +- SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -G -bE:lib$(LIBNAME).exp -bM:SRE'; \
69 > ++ SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-G -Wl,-bE:lib$(LIBNAME).exp -Wl,-bM:SRE'; \
70 > + $(LINK_SO_O); rm -rf lib$(LIBNAME).exp
71 > + link_a.aix:
72 > + @ $(CALC_VERSIONS); \
73 > +- OBJECT_MODE=`expr x$(SHARED_LDFLAGS) : 'x\-[a-z]\([0-9]*\)'`; \
74 > ++ OBJECT_MODE=`expr "x$(SHARED_LDFLAGS)" : 'x\-[a-z]\([0-9]*\)'`; \
75 > + OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
76 > + SHLIB=lib$(LIBNAME).so; \
77 > + SHLIB_SUFFIX=; \
78 > + ALLSYMSFLAGS='-bnogc'; \
79 > + NOALLSYMSFLAGS=''; \
80 > +- SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -G -bE:lib$(LIBNAME).exp -bM:SRE'; \
81 > ++ SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-G -Wl,-bE:lib$(LIBNAME).exp -Wl,-bM:SRE'; \
82 > + $(LINK_SO_A_VIA_O)
83 > + link_app.aix:
84 > +- LDFLAGS="$(CFLAGS) -blibpath:$(LIBRPATH):$${LIBPATH:-/usr/lib:/lib}"; \
85 > ++ LDFLAGS="$(CFLAGS) -Wl,-blibpath:$(LIBRPATH):$${LIBPATH:-/usr/lib:/lib}"; \
86 > + $(LINK_APP)
87 > +
88 > + link_o.reliantunix:
89 > Index: files/gentoo.config-0.9.8
90 > ===================================================================
91 > --- files/gentoo.config-0.9.8 (revision 4735)
92 > +++ files/gentoo.config-0.9.8 (working copy)
93 > @@ -49,6 +49,7 @@
94 > *-linux*) system="linux";;
95 > *-freebsd*) system="BSD";;
96 > *-solaris*) system="solaris";;
97 > + *-aix*) system="aix";;
98 > *) exit 0;;
99 > esac
100 >
101 > @@ -105,6 +106,10 @@
102 > case ${chost_machine} in
103 > i386) machine=x86-${compiler} ;;
104 > esac
105 > + ;;
106 > +aix)
107 > + machine=${compiler}
108 > + ;;
109 > esac
110 >
111 >
112 > Index: openssl-0.9.8e.ebuild
113 > ===================================================================
114 > --- openssl-0.9.8e.ebuild (revision 4735)
115 > +++ openssl-0.9.8e.ebuild (working copy)
116 > @@ -36,6 +36,7 @@
117 > epatch "${FILESDIR}"/${PN}-0.9.8-toolchain.patch
118 > epatch "${FILESDIR}"/${PN}-0.9.8b-doc-updates.patch
119 > epatch "${FILESDIR}"/${PN}-0.9.8-makedepend.patch #149583
120 > + epatch "${FILESDIR}"/${PN}-0.9.8e-aix.patch # shared aix-gcc
121 >
122 > # allow openssl to be cross-compiled
123 > cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
124 > @@ -53,7 +54,9 @@
125 > [[ $(tc-arch) == "ppc64" ]] && replace-flags -O? -O
126 > fi
127 > [[ $(tc-arch) == ppc* ]] && append-flags -fno-strict-aliasing
128 > - use userland_Darwin || append-flags -Wa,--noexecstack
129 > + use userland_Darwin ||
130 > + [[ ${CHOST} == *-*-aix* ]] ||
131 > + append-flags -Wa,--noexecstack
132 >
133 > # using a library directory other than lib requires some magic
134 > sed -i \
135 > @@ -118,7 +121,8 @@
136 > # depend is needed to use $confopts
137 > # rehash is needed to prep the certs/ dir
138 > emake -j1 depend || die "depend failed"
139 > - emake all rehash || die "make all failed"
140 > + emake all || die "make all failed"
141 > + emake rehash || die "make rehash failed"
142 >
143 > # force until we get all the gentoo.config kinks worked out
144 > if has test ${FEATURES} && ! tc-is-cross-compiler ; then
145
146
147 --
148 Fabian Groffen
149 Gentoo on a different level
150
151 --
152 gentoo-alt@g.o mailing list