<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/mkmf.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, b48b841378f80e16378ceb83f3b78e52df9ae023, 2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327]</title>
<updated>2025-05-14T00:18:43+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-05-14T00:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=65e02ab1a6e4482f417ec1d1cb4453958ad36ca3'/>
<id>65e02ab1a6e4482f417ec1d1cb4453958ad36ca3</id>
<content type='text'>
	Fix redefinition of `clock_gettime` and `clock_getres`

	winpthreads-git 12.0.0.r720 provides `clock_gettime` and
	`clock_getres` as inline functions.

	digest.so needs ruby/digest.h which is installed by build-ext

	Copy to path with the base name
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix redefinition of `clock_gettime` and `clock_getres`

	winpthreads-git 12.0.0.r720 provides `clock_gettime` and
	`clock_getres` as inline functions.

	digest.so needs ruby/digest.h which is installed by build-ext

	Copy to path with the base name
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the dedicated constants `LIBARG` and `LIBPATHFLAG`</title>
<updated>2024-12-23T02:52:14+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-02T13:38:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b19fcd02fae7bea162c6f1cee371a4b024305be7'/>
<id>b19fcd02fae7bea162c6f1cee371a4b024305be7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implements [Feature #3456]: Support pkgconf on windows</title>
<updated>2024-12-23T02:52:14+00:00</updated>
<author>
<name>Julien Marrec</name>
<email>julien.marrec@gmail.com</email>
</author>
<published>2024-02-02T08:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=be7e5f1f85685a757bea6c8dae4e30914a5eec67'/>
<id>be7e5f1f85685a757bea6c8dae4e30914a5eec67</id>
<content type='text'>
1. Store the `PKG_CONFIG` variable in Makefile.sub (or try to get it from the ENV var PKG_CONFIG in mkmf.rb)
2. Try to use --msvc-syntax, with a fallback to replacing -Lxxx with -libpath:xxx. --msvc-syntax has been in pkgconf since 1.4.0 (released 7 years ago). pkg-config (freedesktop), does not support it, hence the fallback.
3. The `try_ldflags` passes these `ldflags` as the `opt` parameter to the `link_command`, not as `ldflags`. Unix systems are forgiving in that regard, MSVC is not: as a result as passing them as `opt`, they (specifically the `/libpath:xxx` ones) end up passed before the `-link` command to `cl.exe` and it throws because it ignores it and therefore can't find the lib.

```
cl : Command line warning D9002 : ignoring unknown option '-libpath:C:/Users/julien/.conan2/p/libff3726d89a6255c/p/lib'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Store the `PKG_CONFIG` variable in Makefile.sub (or try to get it from the ENV var PKG_CONFIG in mkmf.rb)
2. Try to use --msvc-syntax, with a fallback to replacing -Lxxx with -libpath:xxx. --msvc-syntax has been in pkgconf since 1.4.0 (released 7 years ago). pkg-config (freedesktop), does not support it, hence the fallback.
3. The `try_ldflags` passes these `ldflags` as the `opt` parameter to the `link_command`, not as `ldflags`. Unix systems are forgiving in that regard, MSVC is not: as a result as passing them as `opt`, they (specifically the `/libpath:xxx` ones) end up passed before the `-link` command to `cl.exe` and it throws because it ignores it and therefore can't find the lib.

```
cl : Command line warning D9002 : ignoring unknown option '-libpath:C:/Users/julien/.conan2/p/libff3726d89a6255c/p/lib'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove leading spaces from `LIBPATHFLAG` and `RPATHFLAG`</title>
<updated>2024-09-29T14:07:16+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-09-29T14:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f6d2e77d9be9a5a829e60908d21d621f4e1ceb0'/>
<id>1f6d2e77d9be9a5a829e60908d21d621f4e1ceb0</id>
<content type='text'>
Join with a space in `MakeMakefile#libpathflag` instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Join with a space in `MakeMakefile#libpathflag` instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Feature #20345] Add `--target-rbconfig` option to mkmf</title>
<updated>2024-04-02T05:24:54+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2024-02-20T07:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8b55aaa85ca3b5333e6659f0f0b1eabdd0b9491b'/>
<id>8b55aaa85ca3b5333e6659f0f0b1eabdd0b9491b</id>
<content type='text'>
Introduce a new mkmf option `--target-rbconfig` to specify the RbConfig
file for the deployment target platform. This option is useful for
cross-compiling Ruby extensions without faking the global top-level
`RbConfig` constant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new mkmf option `--target-rbconfig` to specify the RbConfig
file for the deployment target platform. This option is useful for
cross-compiling Ruby extensions without faking the global top-level
`RbConfig` constant.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean intermediate files and debug info for each target</title>
<updated>2024-03-10T13:12:00+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-03-08T16:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0fb39ab1b9a6df8e668196c721440556938a7641'/>
<id>0fb39ab1b9a6df8e668196c721440556938a7641</id>
<content type='text'>
By replacing `ALLOBJS` suffix with intermediate file suffixes instead
of roughly removing by wildcards.  Made `cleanlibs` append `.dSYM`
suffix for each word in `TARGET_SO`, not the end of the entire list.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By replacing `ALLOBJS` suffix with intermediate file suffixes instead
of roughly removing by wildcards.  Made `cleanlibs` append `.dSYM`
suffix for each word in `TARGET_SO`, not the end of the entire list.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "mkmf.rb: Define missing `POSTLINK` variable in generated Makefile"</title>
<updated>2024-03-05T08:03:30+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-03-05T07:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8e27c01fbb36d5020bb465e17a19a3bad35144ef'/>
<id>8e27c01fbb36d5020bb465e17a19a3bad35144ef</id>
<content type='text'>
This reverts commit 0ae0a0c1c3bb01d118c5a924d731a2b3e9774105.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0ae0a0c1c3bb01d118c5a924d731a2b3e9774105.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "mkmf.rb: Define missing `POSTLINK` variable in generated Makefile"</title>
<updated>2024-03-05T03:08:42+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-03-05T02:38:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0ae0a0c1c3bb01d118c5a924d731a2b3e9774105'/>
<id>0ae0a0c1c3bb01d118c5a924d731a2b3e9774105</id>
<content type='text'>
This reverts commit 71d511615b8dac459d6f88f5896b9859f99c999e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 71d511615b8dac459d6f88f5896b9859f99c999e.
</pre>
</div>
</content>
</entry>
<entry>
<title>mkmf.rb: Define missing `POSTLINK` variable in generated Makefile</title>
<updated>2024-03-02T08:07:37+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2024-03-01T06:08:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=71d511615b8dac459d6f88f5896b9859f99c999e'/>
<id>71d511615b8dac459d6f88f5896b9859f99c999e</id>
<content type='text'>
The `POSTLINK` variable had been used in the `LINK_SO` variable, which
is used to link shared extension libraries. However, the `POSTLINK`
variable had not been defined in the generated Makefile, so extension
libraries were not properly post-processed. It was not a critical issue
for the existing `POSTLINK` usage for darwin platforms, but it would be
a problem for Wasm/WASI platform, which requires *mandatory*
post-processing for shared extension libraries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `POSTLINK` variable had been used in the `LINK_SO` variable, which
is used to link shared extension libraries. However, the `POSTLINK`
variable had not been defined in the generated Makefile, so extension
libraries were not properly post-processed. It was not a critical issue
for the existing `POSTLINK` usage for darwin platforms, but it would be
a problem for Wasm/WASI platform, which requires *mandatory*
post-processing for shared extension libraries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use configured `LD` for linking enc and ext libraries</title>
<updated>2024-02-29T18:16:23+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2024-02-05T17:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=57f014b2fae3f62b26e17a57de761a61908537c4'/>
<id>57f014b2fae3f62b26e17a57de761a61908537c4</id>
<content type='text'>
"AR" was well propagated to the enc.mk and mkmf, but "LD" was not. This
caused the dynamic libraries to be linked with a linker found in the PATH,
which could be different from the one used in the Ruby build process.
This is especially important for cross-compilation, where the host
linker may not be compatible with the target system. (e.g. WebAssembly)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"AR" was well propagated to the enc.mk and mkmf, but "LD" was not. This
caused the dynamic libraries to be linked with a linker found in the PATH,
which could be different from the one used in the Ruby build process.
This is especially important for cross-compilation, where the host
linker may not be compatible with the target system. (e.g. WebAssembly)
</pre>
</div>
</content>
</entry>
</feed>
