use sun sparc gcc to compile 4gl
Posted in 2000
A user on Solaris/UltraSPARC asked whether gcc could be used instead of Sun's Workshop compiler to compile Informix-4GL. The answer given was yes: set INFORMIXC (or INFORMIXCC) to the gcc path and add the -fwritable-strings flag (e.g. C4GLFLAGS=-fwritable-strings), which worked in practice. There was disagreement over whether gcc was officially supported on Solaris or only on Linux, but posters noted it works and that -fwritable-strings is genuinely needed because Informix code writes into string constants.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Hello, I am now using Sun ultra sparc solaris, and want to use gcc to compile Informix 4gl, is it ok or not, or I must use Workshop c++ from Sun? Can you tell me how to use gcc with Informix-4gl ? Thanks for your help.
I think all you need to do is set to environment variables:
INFORMIXC=/usr/local/bin/gcc C4GLFLAGS=-fwritable-strings
Of course, use the gcc path appropriate to your machine. I don't use gcc in
my normal work, but I recently taught the advanced 4GL class with it and
after setting these two variables, it worked fine.
--
=======================================================
Dennis J. Pimple Informix Software, Inc.
Principal Consultant 6300 S Syracuse Way Ste 205
dennisp@informix.com Englewood CO 80111
office: 303-850-0210
direct: 303-740-5611 Opinions expressed are mine,
fax: 303-779-4025 and do not necessarily
reflect those of my employer.
http://www.informix.com
"cheng" <tfhkcyt2000@taifuji.com> wrote in message
news:8s4g9e$r0c2@imsp212.netvigator.com...
> Hello,
>
> I am now using Sun ultra sparc solaris,
> and want to use gcc to compile Informix 4gl,
> is it ok or not, or I must use Workshop c++
> from Sun?
>
> Can you tell me how to use gcc with Informix-4gl ?
>
> Thanks for your help.
>
>
>
I have recently logged a call to Tech Support and was told that gcc
isn't a supported compiler for Sun. It's only supported for Linux.
Andrew Lennard
andy@kontron.demon.co.uk
In article <8s4pre$ejq1@webint.na.informix.com>, Dennis Pimple
<dennisp@informix.com> writes
>I think all you need to do is set to environment variables:
>
> INFORMIXC=/usr/local/bin/gcc> C4GLFLAGS=-fwritable-strings
>
>Of course, use the gcc path appropriate to your machine. I don't use gcc in
>my normal work, but I recently taught the advanced 4GL class with it and
>after setting these two variables, it worked fine.
>
>--
>=======================================================
>Dennis J. Pimple Informix Software, Inc.
>Principal Consultant 6300 S Syracuse Way Ste 205
>dennisp@informix.com Englewood CO 80111
>office: 303-850-0210
>direct: 303-740-5611 Opinions expressed are mine,
> fax: 303-779-4025 and do not necessarily
> reflect those of my employer.
>
>http://www.informix.com
>
>"cheng" <tfhkcyt2000@taifuji.com> wrote in message
>news:8s4g9e$r0c2@imsp212.netvigator.com...
>> Hello,
>>
>> I am now using Sun ultra sparc solaris,
>> and want to use gcc to compile Informix 4gl,
>> is it ok or not, or I must use Workshop c++
>> from Sun?
>>
>> Can you tell me how to use gcc with Informix-4gl ?
>>
>> Thanks for your help.
>>
>>
>>
>
>
Not supported but a) it runs just fine thank you and b) tech support will
not point the finger at RS and hang up if you tell them you use it.
Art S. Kagel
Andy Lennard wrote:
>
> I have recently logged a call to Tech Support and was told that gcc
> isn't a supported compiler for Sun. It's only supported for Linux.
>
> Andrew Lennard
> andy@kontron.demon.co.uk
>
> In article <8s4pre$ejq1@webint.na.informix.com>, Dennis Pimple
> <dennisp@informix.com> writes
> >I think all you need to do is set to environment variables:
> >
> > INFORMIXC=/usr/local/bin/gcc> > C4GLFLAGS=-fwritable-strings
> >
> >Of course, use the gcc path appropriate to your machine. I don't use gcc in
> >my normal work, but I recently taught the advanced 4GL class with it and
> >after setting these two variables, it worked fine.
> >
> >--
> >=======================================================
> >Dennis J. Pimple Informix Software, Inc.
> >Principal Consultant 6300 S Syracuse Way Ste 205
> >dennisp@informix.com Englewood CO 80111
> >office: 303-850-0210
> >direct: 303-740-5611 Opinions expressed are mine,
> > fax: 303-779-4025 and do not necessarily
> > reflect those of my employer.
> >
> >http://www.informix.com
> >
> >"cheng" <tfhkcyt2000@taifuji.com> wrote in message
> >news:8s4g9e$r0c2@imsp212.netvigator.com...
> >> Hello,
> >>
> >> I am now using Sun ultra sparc solaris,
> >> and want to use gcc to compile Informix 4gl,
> >> is it ok or not, or I must use Workshop c++
> >> from Sun?
> >>
> >> Can you tell me how to use gcc with Informix-4gl ?
> >>
> >> Thanks for your help.
> >>
> >>
> >>
> >
> >
Art S. Kagel wrote in message <39ECA379.4F0E1004@bloomberg.net>...
>Not supported but a) it runs just fine thank you and b) tech support will
>not point the finger at RS and hang up if you tell them you use it.
>
Nope, gcc IS supported, there is even a bug fix done for it!
Remember to compile with
INFORMIXCC="gcc -fwritable-strings"; export INFORMIXCC
>Art S. Kagel
I'd been told by Tech Support that gcc is only supported under Linux.
Is the -fwritable-strings switch needed when compiling esql/c? I haven't
used it up to now, and looking at the gcc man page it tells me:
"Writing into string constants is a bad idea...".
In article <3a06e1a9_1@news2.vip.uk.com>, smooth1 <smooth1@iclway.co.uk>
writes
>
>Art S. Kagel wrote in message <39ECA379.4F0E1004@bloomberg.net>...
>>Not supported but a) it runs just fine thank you and b) tech support will
>>not point the finger at RS and hang up if you tell them you use it.
>>
>
> Nope, gcc IS supported, there is even a bug fix done for it!
>Remember to compile with
>
>INFORMIXCC="gcc -fwritable-strings"; export INFORMIXCC>
>>Art S. Kagel
>
>
>
Andrew Lennard andy@kontron.demon.co.uk
Andy Lennard <andy@kontron.demon.co.uk> writes: > I'd been told by Tech Support that gcc is only supported under Linux. Because gcc is the only compiler bundled with the major Linux distributions. > Is the -fwritable-strings switch needed when compiling esql/c? I haven't > used it up to now, and looking at the gcc man page it tells me: > "Writing into string constants is a bad idea...". Yes. The are still plenty of places in the Informix code base that will do that... you just may not have been "inconvenienced" by one, yet. -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B