All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: sparclinux@vger.kernel.org
Subject: Re: [GIT PULL] unify sparc header files
Date: Sun, 06 Jul 2008 20:06:37 +0000	[thread overview]
Message-ID: <20080706200636.GA29523@uranus.ravnborg.org> (raw)
In-Reply-To: <20080628220235.GA3169@uranus.ravnborg.org>

> Of course, you want me to provide "cpp -m64..." not just "cpp" output.
> Because otherwise it will produce a list of 32-bit CPP predefines.  As
> you can see in the sparc64 Makefiles we add "-m64" to the CFLAGS.
> 
> Maybe that's the problem?  Normal CFLAGS are not being propagated to
> the CPP's CFLAGS.  And you guys don't see it because you are using
> cross compilers which default to 64-bit output.  That would explain
> everything.

That makes perfect sense. I should have deduced that myself
if I had just thought a bit longer about it.
In almost all uses of CPP we do not need -m64 but with
unified headers it is obviously needed.


I have now added the appended commit and the full series
can be pulled from:

   ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/sparc2.git master

I have tested that sparc64 continue to build and that we indeed
add the -m64 option to gcc when we build vmlinux.lds
iLet me know if this series is better.

	Sam

Shortlog:

Sam Ravnborg (26):
      sparc: add -m64 when building vmlinux.lds
      sparc: copy exported sparc64 specific header files to asm-sparc
      sparc: Merge asm-sparc{,64}/ioctl.h
      sparc: Merge asm-sparc{,64}/ioctls.h
      sparc: Merge asm-sparc{,64}/param.h
      sparc: Merge asm-sparc{,64}/poll.h
      sparc: Merge asm-sparc{,64}/socket.h
      sparc: Merge asm-sparc{,64}/sockios.h
      sparc: Merge asm-sparc{,64}/fcntl.h
      sparc: Merge asm-sparc{,64}/msgbuf.h
      sparc: Merge asm-sparc{,64}/sembuf.h
      sparc: Merge asm-sparc{,64}/shmbuf.h
      sparc: Merge asm-sparc{,64}/mman.h
      sparc: copy asm-sparc64/fbio.h to asm-sparc
      sparc: Merge asm-sparc{,64}/fbio.h
      sparc: Merge asm-sparc{,64}/resource.h
      sparc: Merge asm-sparc{,64}/setup.h
      sparc: Merge asm-sparc{,64}/termbits.h
      sparc: Merge asm-sparc{,64}/termios.h
      sparc: Merge asm-sparc{,64}/types.h
      sparc: export openprom.h to userspace
      sparc: Merge asm-sparc{,64}/asi.h
      sparc: copy sparc64 specific files to asm-sparc
      sparc: when header files are equal use asm-sparc version
      sparc: merge header files with trivial differences
      sparc: join the remaining header files

Diffstat has not changed (except for the commit below - so omitted.

The commit to fix up -m64 usage:


commit 9fe10bc6fd5aafee2934e35614689e6e905228f7
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Sun Jul 6 21:41:51 2008 +0200

    sparc: add -m64 when building vmlinux.lds
    
    David Miller noticed that the build of vmlinux.lds
    failed to use the -m64 specifier.
    This caused the build to break with a bi-arch gcc with
    unified headers.
    
    Add the -m64 option to KBUILD_CPPFLAGS so all of
    CC, AS, CPP will use them.
    
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index 4b8f2b0..0c135c7 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -9,15 +9,19 @@
 
 CHECKFLAGS	+= -D__sparc__ -D__sparc_v9__ -m64
 
+# We always build for 64 bit
+KBUILD_CPPFLAGS += -m64
+
+# Undefine sparc for vmlinux.lds as the linker uses this symbol
 CPPFLAGS_vmlinux.lds += -Usparc
 
 LDFLAGS		:= -m elf64_sparc
 
-KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
+KBUILD_CFLAGS += -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
 	-ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
 	-Wa,--undeclared-regs
 KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
-KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
+KBUILD_AFLAGS += -mcpu=ultrasparc -Wa,--undeclared-regs
 
 ifeq ($(CONFIG_MCOUNT),y)
   KBUILD_CFLAGS += -pg

  parent reply	other threads:[~2008-07-06 20:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-28 22:02 [GIT PULL] unify sparc header files Sam Ravnborg
2008-06-28 22:29 ` Sam Ravnborg
2008-06-29  6:27 ` Sam Ravnborg
2008-06-30 19:49 ` Adrian Bunk
2008-07-03  7:50 ` David Miller
2008-07-03  8:12 ` David Miller
2008-07-03 10:01 ` David Miller
2008-07-03 13:45 ` Sam Ravnborg
2008-07-03 20:02 ` Adrian Bunk
2008-07-03 20:15 ` David Miller
2008-07-03 20:29 ` Sam Ravnborg
2008-07-03 20:29 ` Sam Ravnborg
2008-07-04 21:10 ` Sam Ravnborg
2008-07-05 20:55 ` Sam Ravnborg
2008-07-05 23:03 ` Sam Ravnborg
2008-07-06  1:56 ` David Miller
2008-07-06  1:57 ` David Miller
2008-07-06 20:06 ` Sam Ravnborg [this message]
2008-07-07  1:18 ` David Miller
2008-07-07  7:46 ` Sam Ravnborg
2008-07-07  7:54 ` David Miller
2008-07-07 20:54 ` Sam Ravnborg
2008-07-08  9:33 ` David Miller
2008-07-09  4:27 ` Sam Ravnborg
2008-07-15  5:58 ` David Miller

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=20080706200636.GA29523@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=sparclinux@vger.kernel.org \
    /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.