diff options
author | Yasuhiro Kimura <yasu@utahime.org> | 2022-10-13 15:22:02 +0900 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-05 19:03:01 +0000 |
commit | 90b66dc73deb9ef303690370395cf831425547c7 (patch) | |
tree | ff42c359213aec994bf28a9cd7615dbb09a2ff27 | |
parent | 159a6b5118a6d8a7ed1660620657337e09c58eaa (diff) |
Fix incompatibility issue of GNU binutils 2.36 and later on FreeBSD.
Commit a6d4d6223ef75119d5373fa4cc04161bcdb4e769 fixes incompatibility
issue of GNU binutils 2.36 and later. If I check the diff of the
commit, there seems to be asumption that the issue is specific to
Linux. But it also happens on FreeBSD if user installs GNU binutils
from FreeBSD ports/packages collections and '/usr/local/bin' comes
before '/usr/bin' in the value of PATH enviroment variable. So fix the
issue also on FreeBSD with following way.
1. Introduce new macro 'HasGnuAr'.
2. Change Imake.tmpl so it defines 'ArCmd' as 'ArCmdBase cq' if
'HasGnuAr' is defined.
3. Define 'HasGnuAr' in both FreeBSD.cf and linux.cf.
Since 'ar' command of FreeBSD base system simply ignores 'l' option,
it also works fine even if GNU binutils isn't installed.
-rw-r--r-- | FreeBSD.cf | 3 | ||||
-rw-r--r-- | Imake.tmpl | 2 | ||||
-rw-r--r-- | linux.cf | 4 |
3 files changed, 8 insertions, 1 deletions
@@ -153,6 +153,9 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe #ifndef HasFlex #define HasFlex YES #endif +#ifndef HasGnuAr +#define HasGnuAr YES +#endif #ifndef HasMktemp #if (OSMajorVersion >= 4) || (OSMajorVersion == 3 && OSMinorVersion >= 1) || \ @@ -1078,7 +1078,7 @@ TCLIBDIR = TclLibDir #define ArCmdBase ar #endif #ifndef ArCmd -#if HasLargeTmp || SystemV4 || LinuxBinUtilsMajorVersion +#if HasLargeTmp || SystemV4 || HasGnuAr #define ArCmd ArCmdBase cq #else #define ArCmd ArCmdBase clq @@ -90,6 +90,10 @@ XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi # define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion #endif +#ifndef HasGnuAr +#define HasGnuAr YES +#endif + XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion) XCOMM binutils: (LinuxBinUtilsMajorVersion) |