Message ID | 1370444532-68682-1-git-send-email-emaste@freebsd.org |
---|---|
State | New |
Headers | show |
05.06.2013 19:02, Ed Maste wrote: > - linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" > + linker_script="-Wl,-T../${config_host_ld} -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" Do we really care? To me it looks like it is better to just remove the variable (which is nothing but just an extra indirection) and be done with it. The variable has been introduced by this commit: commit 4bf6b55b346d33ff16dd25f75bbea8e21f95dfa6 Author: Juan Quintela <quintela@redhat.com> Date: Wed Jul 22 22:37:40 2009 +0200 set SEARCH_PATH for the linker script from output of ld --verbose -v Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> which description does not cover introduction of this variable, and apparently it meant to be something different really. The thing is: that commit introduced that envvar, but at the same time, added several references to open-coded name (config-host.ld) into several places (including the one which is being patched now). I really don't see a point to have it in a variable at all. Ditto for $config_host_mak for that matter. Both are used in makefiles as well, and used there directly. Maybe just get rid of that cruft? If there will be a need for actual variable, it will be trivial to introduce it and patch in this single place where it is referenced... :) Thanks, /mjt
On 5 June 2013 16:03, Michael Tokarev <mjt@tls.msk.ru> wrote: > 05.06.2013 19:02, Ed Maste wrote: >> - linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" >> + linker_script="-Wl,-T../${config_host_ld} -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" > > Do we really care? To me it looks like it is better > to just remove the variable (which is nothing but just > an extra indirection) and be done with it. I don't really care one way or another, and am happy to expand the other uses of it if that's preferred; it just seems odd to me to use the variable in one spot and the literal filename in another. (I found this while doing a little cleanup in preparation to avoid use of the ldscripts/ files on FreeBSD.)
diff --git a/configure b/configure index 1654413..ec833df 100755 --- a/configure +++ b/configure @@ -4445,7 +4445,7 @@ fi if test "$ARCH" = "tci"; then linker_script="" else - linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" + linker_script="-Wl,-T../${config_host_ld} -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" fi if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
Signed-off-by: Ed Maste <emaste@freebsd.org> --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)