freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Sebastien FLAESCH <sf AT 4js.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Support for AIX 7.1
- Date: Wed, 09 May 2012 14:51:36 +0200
Is this expected on AIX 7.1:
$ ./config.guess
rs6000-ibm-aix
?
Seb
On 05/09/2012 11:13 AM, Sebastien FLAESCH wrote:
Hello,
Sorry for the mistake, I have now tested with CFLAGS set before running
configure.
That worked.
A collegue told me that it was also sufficient to do following:
1) export OBJECT_MODE=64
2) Patch ./src/tds/mem.c with:
#if HAVE_SYS_SOCKET_H
#include<sys/socket.h>
#endif /* HAVE_SYS_SOCKET_H */
3) CC=xlc CFLAGS="-q64" ./configure ...
...
However, in both cases, when looking at the lib directory, it appears that it
does not produce shared libs, only static libs are created:
$ dump -X64 -H libtdsodbc.a
(no output)
$
Any idea?
Seb
On 05/04/2012 07:33 PM, James K. Lowden wrote:
On Fri, 04 May 2012 17:06:37 +0200
Sebastien FLAESCH<sf AT 4js.com> wrote:
export CFLAGS="-DSYSV -D_AIX -D_AIX53 -D_ALL_SOURCE -O2"
and restarted the build with:
make clean all
and now I get:
Making all in fisql
/bin/sh ../../../libtool --tag=CC --mode=link gcc
-D_THREAD_SAFE -g -O2 -Wdeclaration-after-statement -o fisql
fisql.o terminal.o edit.o handlers.o
interrupt.o ../../dblib/libsybdb.la ../../replacements/libreplacements.la
-liconv -lpthreads
As I said, Seb,
You will need to re-run the configure script for the modified CFLAGS
to take effect
Note that although you exported CFLAGS, those switches aren't passed on
the command line quoted above. They won't be until you re-run
configure.
Let me unpack that a bit, because it once confused me, too.
There's nothing magical about CFLAGS; you'll note it's not mentioned on
the gcc man page. It's just a convention. The Makefile author can
construct the Makefile to use CFLAGS if defined, giving the user -- the
guy running make(1) -- a way to pass arbitrary options to the
compiler.
The configure script that generates the FreeTDS Makefiles was itself
generated by autoconf. The generated Makefiles sadly do not honor
CFLAGS. They instead *set* CFLAGS to the value that was in
CFLAGS at the time configure was run. See for yourself:
$ grep -n ^CFLAGS build/src/apps/Makefile
202:CFLAGS = -g -O0 -Wdeclaration-after-statement
(YMMV.)
I don't know why configure works that way. If you asked on the
autoconf mailing list, I imagine they'd say there's no way for make(1)
to determine if and when files need to be recompiled when CFLAGS
changes. (Reading CFLAGS at build-time runs the risk of having
different files compiled with different options, which could lead to no
problem or very weird problems.)
I favor sharp knives. To me, the point of the configure script is to
determine the target machine's characteristics; I would prefer to have
the generated Makefiles incorporate CFLAGS (and friends) from the
environment at compile time. But they don't.
Once burned and twice shy.
Regards,
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/03/2012
-
Re: [freetds] Support for AIX 7.1,
James K. Lowden, 05/03/2012
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/03/2012
-
Re: [freetds] Support for AIX 7.1,
James K. Lowden, 05/04/2012
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/04/2012
-
Re: [freetds] Support for AIX 7.1,
James K. Lowden, 05/04/2012
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/09/2012
- Re: [freetds] Support for AIX 7.1, Sebastien FLAESCH, 05/09/2012
- Re: [freetds] Support for AIX 7.1, James K. Lowden, 05/09/2012
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/09/2012
-
Re: [freetds] Support for AIX 7.1,
James K. Lowden, 05/04/2012
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/04/2012
-
Re: [freetds] Support for AIX 7.1,
James K. Lowden, 05/04/2012
-
Re: [freetds] Support for AIX 7.1,
Sebastien FLAESCH, 05/03/2012
-
Re: [freetds] Support for AIX 7.1,
James K. Lowden, 05/03/2012
Archive powered by MHonArc 2.6.24.