From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Subject: Re: [PATCH v7 03/28] build: build Kconfig and config rules Date: Mon, 14 Dec 2015 11:52:31 -0600 Message-ID: <566F01DF.1030200@cardoe.com> References: <1449766122-6359-1-git-send-email-cardoe@cardoe.com> <1449766122-6359-4-git-send-email-cardoe@cardoe.com> <566EFDD302000078000BF3F6@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3082233620654640804==" Return-path: In-Reply-To: <566EFDD302000078000BF3F6@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , Keir Fraser , Stefano Stabellini , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============3082233620654640804== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QHAToKV34l3KqerceplPvFJLf9BbO36Dv" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QHAToKV34l3KqerceplPvFJLf9BbO36Dv Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/14/15 10:35 AM, Jan Beulich wrote: >>>> On 10.12.15 at 17:48, wrote: >> --- /dev/null >> +++ b/xen/Kconfig >> @@ -0,0 +1,24 @@ >> +# >> +# For a description of the syntax of this configuration file, >> +# see docs/misc/kconfig-language.txt >> +# >> +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration" >> + >> +config SRCARCH >> + string >> + option env=3D"SRCARCH" >> + >> +config ARCH >> + string >> + option env=3D"ARCH" >> + >> +source "arch/$SRCARCH/Kconfig" >> + >> +config XEN_FULLVERSION >=20 > I continue to wonder what use the XEN_ prefix here is. This can be named anything you want. The existing makefiles call the version "XEN_FULLVERSION" so I'm just keeping it the same. Its just to have the same version number that the makefiles generate stored in the =2Econfig file for if/when people start posting .config files somewhere. Honestly at this point I'll paint the bike whatever color is desired. >=20 >> --- a/xen/Makefile >> +++ b/xen/Makefile >> @@ -20,6 +20,14 @@ MAKEFLAGS +=3D -rR >> =20 >> EFI_MOUNTPOINT ?=3D $(BOOT_DIR)/efi >> =20 >> +# Don't break if the build process wasn't called from the top level >> +# we need XEN_TARGET_ARCH to generate the proper config >> +include $(XEN_ROOT)/Config.mk >> + >> +# Allow someone to change their config file >> +KCONFIG_CONFIG ?=3D .config >> +export KCONFIG_CONFIG >=20 > For compactness' sake this could be done on one line afaik. Sure. I copied and pasted this from the Linux kernel where its two lines. I'll send another squash in. >=20 >> --- /dev/null >> +++ b/xen/arch/x86/Kconfig >> @@ -0,0 +1,17 @@ >> +config X86_64 >> + def_bool y >> + >> +config X86 >> + def_bool y >> + >> +config ARCH_DEFCONFIG >> + string >> + default "arch/x86/configs/x86_64_defconfig" >> + >> +menu "Architecture Features" >> + >> +endmenu >> + >> +source "common/Kconfig" >> + >> +source "drivers/Kconfig" >=20 > I'm still missing "config 64BIT" in this file. You had wanted me to factor that out in earlier series. So now its only in the arm side which is the only place its used. >=20 >> --- /dev/null >> +++ b/xen/tools/kconfig/Makefile.kconfig >> @@ -0,0 +1,76 @@ >> +# xen/tools/kconfig >> + >> +# default rule to do nothing >> +all: >> + >> +XEN_ROOT =3D $(CURDIR)/.. This was meant to go away once the xen/Makefile exported it. Which has already been merged in. >> + >> +# Xen doesn't have a silent build flag >> +quiet :=3D silent_ >> +Q :=3D @ >> +kecho :=3D : >> + >> +# eventually you'll want to do out of tree builds >> +srctree =3D $(XEN_ROOT)/xen >=20 > Doesn't this add one /xen too many? Or wait, don't you need > two more /.. when setting XEN_ROOT above? See above comment on XEN_ROOT. >=20 >> +objtree =3D $(srctree) >=20 > Do both of them really need to use =3D (instead of the more efficient > ":=3D")? Sure. I will send you a squash. >=20 >> +src :=3D tools/kconfig >> +obj :=3D $(src) >> +KBUILD_SRC :=3D >> + >> +# handle functions (most of these lifted from different Linux makefil= es >> +dot-target =3D $(dir $@).$(notdir $@) >> +depfile =3D $(subst $(comma),,$(dot-target).d) >> +basetarget =3D $(basename $(notdir $@)) >> +cmd =3D $(cmd_$(1)) >> +if_changed =3D $(if y, \ >> + @set -e; \ >> + $(cmd_$(1)); \ >> + ) >> + >> +if_changed_dep =3D $(if y, \ >> + @set -e; \ >> + $(cmd_$(1)); \ >> + ) >=20 > I'm quite sure to have asked for these strange multi line constructs > to be collapsed. Sure. In the squash. >=20 >> +# provide the host compiler >> +HOSTCC :=3D gcc >> +HOSTCXX :=3D g++ >=20 > Didn't you mean to inherit these instead of forcing them here? No. I pointed out that the only real way to inherit them is to pull in top-level Config.mk which is too heavy handed. If we have some agreement to break up the pieces that truly belong in there then sure. Honestly I would prefer to do that break up after the fact. I've being working on this series for 3 months now and a lot of the issues brought up can happen after the fact because, like this one, it involves fixing up existing Xen makefiles rather than issues with this series. >=20 >> +# force target >> +PHONY +=3D FORCE >> + >> +FORCE: >> + >> +SRCARCH =3D $(shell echo $(ARCH) | \ >> + sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') >> +export SRCARCH >> + >> +# include the original Makefile from Linux >> +include $(src)/Makefile >> +# include the Makefile.host from Linux >> +include $(src)/Makefile.host >=20 > Just one comment for both lines would do. >=20 > Jan >=20 Sure. I'll send you a squash. --=20 Doug Goldstein --QHAToKV34l3KqerceplPvFJLf9BbO36Dv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJWbwHiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUwMAP/371ojqdHQnkIl4FNrVZOz35 PbWKiVur23xK2F/1HBcTZqv0IbkvhQ2Eq3f65ZDugipPb3+oJhkvoM8i5Smh1Xvb a1CI5M2U2s4aPZF2554xEspAWswoMSRKcy99oqAPNnwC9eWJQ3mba/4KzWk240iZ hdyM2QfZmfxuDk9/snaNBDsGTw+vog0A3gnRFWnjthBiA/m9MUD6lPoQ6kU9kMh2 j5wljZcizUVByRrY1j7nWjBIdMbxiAfSqEZEbty6+RMK+2TGqgWlAxion2FbQ1nO 4rPw5XL3wRb3kenx+53fbrpM0mNSR7k2pFchZnFo8UkcTQJVCZY6qqu+2gwAzyiC gRZXgOg3MK0Y2Wp7xkcT5OYgFYy6DzUotXKYmaxAnn1wMBcvBdnITYIu9AM6klB5 Lg+JMPm76xw7nwkQO/Bx9mK5YpZObvxN5zU8wzZiJXllZdX5wRmPzRspa3NaGy1C rDvG7Tytk4pPfFZz8QH3khIvpD649njRQUij22rz5nPEZgwJX5iIgLMgZ+pQTkfD YLtlvdOYHCONDgKHBfzBECQlzU/RDR8NNeDFJwmwY5iHuYTg1l8TtrhQ4DzjurB7 xCxR4UtHjIygKiGKvBjwUacn05TCWE8k3LkH1SgAyV9+fNjQdkcTHoMH86r72Y5G N+K0nEvgSJp7kPFChrUO =AKNU -----END PGP SIGNATURE----- --QHAToKV34l3KqerceplPvFJLf9BbO36Dv-- --===============3082233620654640804== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3082233620654640804==--