All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Michal Marek <mmarek@suse.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>, Tony Luck <tony.luck@gmail.com>,
	linux arch <linux-arch@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Richard Weinberger <richard@nod.at>,
	"David S. Miller" <davem@davemloft.net>,
	Arnaud Lacombe <lacombar@gmail.com>,
	Andi Kleen <andi@firstfloor.org>,
	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH 3/4] kbuild: link of vmlinux moved to a script
Date: Thu, 10 May 2012 10:44:06 -0400	[thread overview]
Message-ID: <4FABD436.7070402@windriver.com> (raw)
In-Reply-To: <20120510122210.GA17550@sepie.suse.cz>

On 12-05-10 08:22 AM, Michal Marek wrote:
> On Wed, May 09, 2012 at 06:58:16PM -0400, Paul Gortmaker wrote:
>> On Tue, May 8, 2012 at 12:51 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>>> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
>>> index 26c5b65..1f4c27b 100644
>>> --- a/scripts/link-vmlinux.sh
>>> +++ b/scripts/link-vmlinux.sh
>>> @@ -78,8 +78,8 @@ kallsyms()
>>>                kallsymopt=--all-symbols
>>>        fi
>>>
>>> -       local aflags="${KBUILD_AFLAGS} ${NOSTDINC_FLAGS}                     \
>>> -                     ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
>>> +       local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
>>> +                     ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
>>
>> All the linux-next builds for mips are failing, which I tracked down to this.
>> Applying the above update doesn't help.  What is happening is that MIPS
>> gets KBUILD_CPPFLAGS double-quoted, and then you get:
>>
>> + mips-wrs-linux-gnu-nm -n .tmp_vmlinux1
>> + scripts/kallsyms
>> + mips-wrs-linux-gnu-gcc -D__ASSEMBLY__ <..snip..>  -D__KERNEL__
>> '-D"VMLINUX_LOAD_ADDRESS=0xffffffff81100000"' '-D"DATAOFFSET=0"' -c -o
>> .tmp_kallsyms1.o -x assembler-with-cpp -
>> <command-line>:0: error: macro names must be identifiers
>> <command-line>:0: error: macro names must be identifiers
>> make[1]: *** [vmlinux] Error 1
>>
>> Note the  '-D"VMLINUX_LOAD_ADDRESS=0xffffffff81100000"' '-D"DATAOFFSET=0"'
>> part -- that is what triggers the two above errors.
> 
> I think it should be as simple as the below patch. But I have no mips
> machine to verify myself.

Well I haven't boot tested it on anything either, but it does
seem to resolve the double quoting that caused the compile failure.

Thanks,
Paul.
--

> 
> Michal
> 
> From d801533d5e6e509d5e115d2fb47655267c4c5ed4 Mon Sep 17 00:00:00 2001
> From: Michal Marek <mmarek@suse.cz>
> Date: Thu, 10 May 2012 14:15:49 +0200
> Subject: [PATCH] mips: Fix KBUILD_CPPFLAGS definition
> 
> The KBUILD_CPPFLAGS variable is no longer passed to sh -c 'gcc ...',
> but exported and used by the link-vmlinux.sh script. This means that the
> double-quotes will not be evaluated by the shell.
> 
> Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> 
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 4fedf5a..722e04a 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -219,8 +219,8 @@ endif
>  
>  KBUILD_AFLAGS	+= $(cflags-y)
>  KBUILD_CFLAGS	+= $(cflags-y)
> -KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
> -KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
> +KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
> +KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
>  
>  LDFLAGS			+= -m $(ld-emul)
>  

WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Michal Marek <mmarek@suse.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>, Tony Luck <tony.luck@gmail.com>,
	linux arch <linux-arch@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Richard Weinberger <richard@nod.at>,
	"David S. Miller" <davem@davemloft.net>,
	Arnaud Lacombe <lacombar@gmail.com>,
	Andi Kleen <andi@firstfloor.org>, <ralf@linux-mips.org>,
	<linux-mips@linux-mips.org>
Subject: Re: [PATCH 3/4] kbuild: link of vmlinux moved to a script
Date: Thu, 10 May 2012 10:44:06 -0400	[thread overview]
Message-ID: <4FABD436.7070402@windriver.com> (raw)
In-Reply-To: <20120510122210.GA17550@sepie.suse.cz>

On 12-05-10 08:22 AM, Michal Marek wrote:
> On Wed, May 09, 2012 at 06:58:16PM -0400, Paul Gortmaker wrote:
>> On Tue, May 8, 2012 at 12:51 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>>> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
>>> index 26c5b65..1f4c27b 100644
>>> --- a/scripts/link-vmlinux.sh
>>> +++ b/scripts/link-vmlinux.sh
>>> @@ -78,8 +78,8 @@ kallsyms()
>>>                kallsymopt=--all-symbols
>>>        fi
>>>
>>> -       local aflags="${KBUILD_AFLAGS} ${NOSTDINC_FLAGS}                     \
>>> -                     ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
>>> +       local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
>>> +                     ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
>>
>> All the linux-next builds for mips are failing, which I tracked down to this.
>> Applying the above update doesn't help.  What is happening is that MIPS
>> gets KBUILD_CPPFLAGS double-quoted, and then you get:
>>
>> + mips-wrs-linux-gnu-nm -n .tmp_vmlinux1
>> + scripts/kallsyms
>> + mips-wrs-linux-gnu-gcc -D__ASSEMBLY__ <..snip..>  -D__KERNEL__
>> '-D"VMLINUX_LOAD_ADDRESS=0xffffffff81100000"' '-D"DATAOFFSET=0"' -c -o
>> .tmp_kallsyms1.o -x assembler-with-cpp -
>> <command-line>:0: error: macro names must be identifiers
>> <command-line>:0: error: macro names must be identifiers
>> make[1]: *** [vmlinux] Error 1
>>
>> Note the  '-D"VMLINUX_LOAD_ADDRESS=0xffffffff81100000"' '-D"DATAOFFSET=0"'
>> part -- that is what triggers the two above errors.
> 
> I think it should be as simple as the below patch. But I have no mips
> machine to verify myself.

Well I haven't boot tested it on anything either, but it does
seem to resolve the double quoting that caused the compile failure.

Thanks,
Paul.
--

> 
> Michal
> 
> From d801533d5e6e509d5e115d2fb47655267c4c5ed4 Mon Sep 17 00:00:00 2001
> From: Michal Marek <mmarek@suse.cz>
> Date: Thu, 10 May 2012 14:15:49 +0200
> Subject: [PATCH] mips: Fix KBUILD_CPPFLAGS definition
> 
> The KBUILD_CPPFLAGS variable is no longer passed to sh -c 'gcc ...',
> but exported and used by the link-vmlinux.sh script. This means that the
> double-quotes will not be evaluated by the shell.
> 
> Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> 
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 4fedf5a..722e04a 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -219,8 +219,8 @@ endif
>  
>  KBUILD_AFLAGS	+= $(cflags-y)
>  KBUILD_CFLAGS	+= $(cflags-y)
> -KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
> -KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
> +KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
> +KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
>  
>  LDFLAGS			+= -m $(ld-emul)
>  

  reply	other threads:[~2012-05-10 14:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28 20:56 [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile Sam Ravnborg
2012-04-28 20:58 ` [PATCH 1/4] kbuild: drop unused KBUILD_VMLINUX_OBJS from " Sam Ravnborg
2012-04-28 20:58   ` Sam Ravnborg
2012-04-28 20:58 ` [PATCH 2/4] kbuild: refactor final link of sparc32 Sam Ravnborg
2012-04-28 20:58   ` Sam Ravnborg
2012-04-29  8:27   ` Geert Uytterhoeven
2012-04-28 20:59 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Sam Ravnborg
2012-04-28 20:59   ` Sam Ravnborg
2012-04-29  8:28   ` Geert Uytterhoeven
2012-04-29  8:28     ` Geert Uytterhoeven
2012-05-04 23:05   ` Michal Marek
2012-05-05  8:29     ` Sam Ravnborg
2012-05-07 23:15       ` Tony Luck
2012-05-08 16:51         ` Sam Ravnborg
2012-05-08 17:39           ` Tony Luck
2012-05-08 17:39             ` Tony Luck
2012-05-08 17:53             ` [PATCH] kbuild: fix ia64 link Sam Ravnborg
2012-05-08 17:53               ` Sam Ravnborg
2012-05-08 17:53               ` Sam Ravnborg
2012-05-10 12:22               ` Michal Marek
2012-05-09 22:58           ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Paul Gortmaker
2012-05-10  5:16             ` Sam Ravnborg
2012-05-10  5:16               ` Sam Ravnborg
2012-05-10 12:22             ` Michal Marek
2012-05-10 12:22               ` Michal Marek
2012-05-10 12:22               ` Michal Marek
2012-05-10 14:44               ` Paul Gortmaker [this message]
2012-05-10 14:44                 ` Paul Gortmaker
2012-05-15 22:20                 ` Michal Marek
2012-09-06 20:43   ` James Hogan
2012-04-28 21:00 ` [PATCH 4/4] kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux Sam Ravnborg
2012-04-28 21:00   ` Sam Ravnborg
2012-04-29  8:29   ` Geert Uytterhoeven
2012-04-29  8:29     ` Geert Uytterhoeven
2012-04-29  8:26 ` [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile Geert Uytterhoeven
2012-04-29  8:26   ` Geert Uytterhoeven
2012-04-29 11:03   ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24 19:41 [PATCH " Sam Ravnborg
2012-04-24 19:44 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Sam Ravnborg
2012-04-24 19:44   ` Sam Ravnborg
2012-04-25 14:24   ` Nick Bowler
2012-04-25 16:30     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FABD436.7070402@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=lacombar@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mmarek@suse.cz \
    --cc=ralf@linux-mips.org \
    --cc=richard@nod.at \
    --cc=sam@ravnborg.org \
    --cc=tony.luck@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.