[Bug 240716] LD in make.conf is not setting linker

2019-09-25 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

Ed Maste  changed:

   What|Removed |Added

 Status|New |Closed
 CC||ema...@freebsd.org
 Resolution|--- |Works As Intended

--- Comment #9 from Ed Maste  ---
It is perhaps inconvenient that LD controls only direct linker invocations from
Makefiles, not the linker invoked by the compiler driver, but this is as
expected.

You may be able to make use of the compiler's -B option.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

--- Comment #8 from Mark Millard  ---
(In reply to sid from comment #5)

QUOTE
If LD is not being used, why is it an argument?
END QUOTE

Some makefiles use ${LD} (or ${XLD}) to request linking.
many do not. That some do use them is enough to justify
the existence of LD (and XLD) in the infrastructure.

In effect you are requesting changes to a large number
of makefiles to work differently than they do now: to
explicitly use ${LD} (or ${XLD}) based link commands
instead of what they now use.

There are issues, such as powerpc family --secure-plt
clang output being incompatible with modern binutils'
ld: ld reverts to bss plt and returns on error code
because it did so. One can not switch linkers
independently in all cases, only some.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

s...@bsdmail.com changed:

   What|Removed |Added

   Severity|Affects Some People |Affects Only Me

--- Comment #7 from s...@bsdmail.com ---
Ok, I understand a little more.

LD for everything was meant to be overridden by the makefile in /usr/src/.

It should be addressed still in 12-stable, current and for later llvm versions
in ports, for the purpose of finding and fixing bugs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

--- Comment #6 from s...@bsdmail.com ---
In a previous 11 release, LD did set the linker for base, kernel and ports.
Then in another 11 release, and in 12.0, the LD argument in make.conf stopped
working.

Linking manually allowed all linkers to build ports and the world. Binutil's
linker can build everything.

In my last post, I left out that CC, CXX and CPP also builds ports, as well as
world and kernel. XCC, XCXX and XCPP override for ports only.

When a port requires a linker, it usually pulls in binutil's linker. LLVM60 and
LLVM80 get pulled in as a requirement for some ports, possibly because of the
linker, which is not independent of the package.

These details about LD and LLVM's linkers need to be documented, or at least
addressed in 12.1, stable or current. LD was intended to set the linker, and it
should.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

--- Comment #5 from s...@bsdmail.com ---
In make.conf

 COMPILER_TYPE=  clang
 CC= /usr/local/bin/clang*0
 CXX=/usr/local/bin/clang++*0
 CPP=/usr/local/bin/clang-cpp*0

these arguments set the compiler for the whole system, base system and kernel,
which is not limited to ports, which makefiles of ports are about.
 LD=

is supposed to set the linker, as CC, CXX and CPP do.

XCC, XCXX, XCPP and XLD are specifically about port makefiles, so makefiles
about ports can apply to these arguments containing the prefix of X.

LD has to do with the base system, and everything else. It's not specific to
port makefiles.

If LD is not being used, why is it an argument? The linker for everything
should be able to be chosen from make.conf, even if the one from base is to be
recommended. LD still works for building world and ports, and it did and is
still meant to set the linker for the kernel.

I believe a lot of bugs will remain hidden, if it is assumed that LD in
make.conf sets the actual linker. This is going to hide bugs that may be
impeding why the linker for other architectures isn't consistent. It is going
to slow down using the fixes similar to those from the base linker that work,
to the linkers in ports that don't work for everything.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

Mark Millard  changed:

   What|Removed |Added

 CC||marklmi26-f...@yahoo.com

--- Comment #4 from Mark Millard  ---
(In reply to sid from comment #2)

The claims about LD and XLD are false. They only apply
to makefiles that explicitly use ${LD} and/or ${XLD}
notation for linking commands.

Makefiles that use cc, c++, clang, clang++, gcc, or g++
commands (or other such) to request linking do not use
LD or XLD and are not intended to use them.

In any case where LD or XLD was not used, check if the
makefile involved used ${LD} or ${XLD} or not.

I expect that this defect report will be rejected by
those that can do so.

(The same points were made on the lists by multiple
people, me being one of them.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

s...@bsdmail.com changed:

   What|Removed |Added

   Severity|Affects Only Me |Affects Some People

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

--- Comment #3 from s...@bsdmail.com ---
This problem is also likely for other FreeBSD versions too. It has been a
problem in earlier 11 releases. So it's likely for production, stable and
current versions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

--- Comment #2 from s...@bsdmail.com ---
Just a reminder.

LD is meant to set the linker for everything: kernel, world and ports.

XLD only overrides LD for ports and perhaps custom source code.

The other options for the compiler in make.conf work this way with CC, CXX, CPP
and their variants with the X in front.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

s...@bsdmail.com changed:

   What|Removed |Added

Version|12.0-STABLE |12.0-RELEASE

--- Comment #1 from s...@bsdmail.com ---
This problem is likely for other architectures as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 240716] LD in make.conf is not setting linker

2019-09-20 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240716

Bug ID: 240716
   Summary: LD in make.conf is not setting linker
   Product: Base System
   Version: 12.0-STABLE
  Hardware: amd64
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: bin
  Assignee: b...@freebsd.org
  Reporter: s...@bsdmail.com

LD and XLD in make.conf does not set the linker as it's supposed to do. It
always uses base linker. I have to manually softlink /usr/bin/ld to
/usr/local/bin/ld.lld* or to binutil's linker.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"