All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] contrib: fix out-of-tree build with jerry-rig.sh
@ 2017-05-10 21:31 Benedikt Morbach
  2017-05-11 10:25 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Benedikt Morbach @ 2017-05-10 21:31 UTC (permalink / raw)
  To: wireguard

this makes the build system put the objects in ${O}/net/wireguard
instead of ${O}/../../../../../../../../../../../../../../../../../../../../../..${WG}/
(where ${WG} is the full path to wireguard/src), allowing out-of-tree
kernel builds to work with WireGuard jerry-rigged in.
---
 contrib/kernel-tree/jerry-rig.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/kernel-tree/jerry-rig.sh b/contrib/kernel-tree/jerry-rig.sh
index 3d4139a..afc1d9d 100755
--- a/contrib/kernel-tree/jerry-rig.sh
+++ b/contrib/kernel-tree/jerry-rig.sh
@@ -8,5 +8,6 @@ if [[ ! -e $K/net/Kconfig ]]; then
 	exit 1
 fi
 
-sed -i "/^if INET\$/a source \"$WG/Kconfig\"" "$K/net/Kconfig"
-echo "obj-y += ../../../../../../../../../../../../../../../../../../../../../..$WG/" >> "$K/net/Makefile"
+ln -sfT "../../../../../../../../../../../../../../../../../../../../../..$WG/" "$K/net/wireguard"
+sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" "$K/net/Kconfig"
+echo "obj-y += wireguard/" >> "$K/net/Makefile"
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] contrib: fix out-of-tree build with jerry-rig.sh
  2017-05-10 21:31 [PATCH] contrib: fix out-of-tree build with jerry-rig.sh Benedikt Morbach
@ 2017-05-11 10:25 ` Jason A. Donenfeld
  2017-05-11 12:30   ` Benedikt Morbach
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2017-05-11 10:25 UTC (permalink / raw)
  To: Benedikt Morbach; +Cc: WireGuard mailing list

Hey,

Interesting patch. Is the idea here that using a symlink fixes some
issue with just putting all the ../../../../.. stuff in the file
directly? If so, what was the problem exactly? I use the existing
jerry-rig.sh thing successfully, so I'm wondering under what
circumstances it breaks.

Thanks,
Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] contrib: fix out-of-tree build with jerry-rig.sh
  2017-05-11 10:25 ` Jason A. Donenfeld
@ 2017-05-11 12:30   ` Benedikt Morbach
  2017-05-11 19:54     ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Benedikt Morbach @ 2017-05-11 12:30 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hi Jason,

I started doing out-of-tree kernel builds with "make KBUILD_OUTPUT=/foo".
While it does work, it puts wireguards .o files in
/foo/net/../../../..../wireguard/src, which isn't exactly what I
expected/intended. By changing the path in the Makefile the .o files
end up in /foo/net/wireguard.

Thanks
Benedikt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] contrib: fix out-of-tree build with jerry-rig.sh
  2017-05-11 12:30   ` Benedikt Morbach
@ 2017-05-11 19:54     ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2017-05-11 19:54 UTC (permalink / raw)
  To: Benedikt Morbach; +Cc: WireGuard mailing list

https://git.zx2c4.com/WireGuard/commit/?id=271d34ccbef02e93f450dfe5e1609dd8c98c7d44

Volia!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-11 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-10 21:31 [PATCH] contrib: fix out-of-tree build with jerry-rig.sh Benedikt Morbach
2017-05-11 10:25 ` Jason A. Donenfeld
2017-05-11 12:30   ` Benedikt Morbach
2017-05-11 19:54     ` Jason A. Donenfeld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.