[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnu-libiconv] [PATCH] Append the extension to the executables p
From: |
KO Myung-Hun |
Subject: |
Re: [bug-gnu-libiconv] [PATCH] Append the extension to the executables properly |
Date: |
Fri, 16 Dec 2016 14:48:42 +0900 |
User-agent: |
Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.6esrpre) Gecko/20120715 Firefox/10.0.6esrpre SeaMonkey/2.7.2 |
Hi/2.
Bruno Haible wrote:
> KO Myung-Hun wrote:
>>> Can you please try the attached wrapper script? That is, store it, and
>>> run configure as
>>> ./configure CC="/home/ko/os2compile gcc" CPPFLAGS="-Wall"
>>>
>>> This wrapper script idea has made it possible to use even MSVC from within
>>> the autotools generated Unix-style Makefiles.
>>>
>>
>> I tested, I had to change two things.
>> First, configure failed at ld check because os2compile printed all
>> commands executed and this corrupted outputs expected by configure.
>> Second, .exe was appended even if DLL with .dll was generated.
>
> Thanks. Also, I did some fixes regarding quoting, empty arguments, and
> arguments that contain newlines. Find the result attached.
>
Good job!
> But now I found a README.os2 of some package which reads:
>
> -------------------------------------------------------------------------------
> Installation on OS/2:
>
> - Requires emx+gcc and a working shell (Bourne shell, Korn shell or GNU bash).
>
> - Set the environment variables CC=gcc CFLAGS="-Zexe" before calling
> `configure'.
> -------------------------------------------------------------------------------
>
> The documentation of the -Zexe option:
>
> -Zexe
>
> If the -Zexe option is present, emxomfld deletes the output file
> (whose name is given on the command line) and adds .exe to the
> output filename. After calling LINK386, emxomfld creates an empty
> output file (without .exe). This feature is used for minimizing
> changes to Unixoid makefiles. See also the -Zexe option of GCC
> and ld.
>
> So it seems that neither your Makefile.in patch nor my 'os2compile' script
> is needed. Add you need is to set CFLAGS="-Zexe" before calling configure !!
>
Although I don't know the package you are saying, adding -Zexe to CFLAGS
is not a good way. Of course, I also sometimes use -Zexe mainly for
testing build works before patching sources such as scripts and
Makefiles. However, I don't prefer -Zexe because:
1. It cannot be used to build DLLs. On OS/2, -Zdll is used to build
DLLs. -Zexe and -Zdll cannot be used at the same time. In case of
libiconv, DLLs such as iconv2.dll cannot be built with CFLAGS="-Zexe" by
libtool using -Zdll.
2. Currently, Makefile of libiconv tests requires ../src/iconv_no_i18n
as a dependency. However, its real target is ../src/iconv_no_i18n.exe on
OS/2.
3. It generates both [file] and [file.exe]. Generally, however, Makefile
cleans only [file], so [file.exe] remains. This is not true for Makefile
of libiconv tests.
Therefore, setting CFLAGS="-Zexe" and calling configure is not a proper
solution.
In case of os2compile:
1. This is slow, about 1.5 factor.
2. This shares [2] and [3] of -Zexe problems.
3. In addition, a target [file] will be generated whenever Makefile is
called. Because [file.exe] is genereated not [file].
As a result, my patch is more proper. It's fast and can build DLLs and
perform 'make check'. Moreover, @EXEEXT@ is already used in Makefile of
libiconv tests.
--
KO Myung-Hun
Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
Korean OS/2 User Community : http://www.ecomstation.co.kr