Skip to content
  • Yasuhiro Kimura's avatar
    Fix incompatibility issue of GNU binutils 2.36 and later on FreeBSD. · 90b66dc7
    Yasuhiro Kimura authored and Alan Coopersmith's avatar Alan Coopersmith committed
    Commit a6d4d622 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.
    90b66dc7