From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTIVR-0007mk-DU for qemu-devel@nongnu.org; Mon, 19 Mar 2007 10:06:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTIVP-0007lu-Vf for qemu-devel@nongnu.org; Mon, 19 Mar 2007 10:06:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTIVP-0007lr-Ln for qemu-devel@nongnu.org; Mon, 19 Mar 2007 09:06:35 -0500 Received: from eastrmmtao104.cox.net ([68.230.240.46]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HTIFr-0004yf-EP for qemu-devel@nongnu.org; Mon, 19 Mar 2007 09:50:31 -0400 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao104.cox.net (InterMail vM.7.05.02.00 201-2174-114-20060621) with ESMTP id <20070319135030.ICUJ460.eastrmmtao104.cox.net@eastrmimpo02.cox.net> for ; Mon, 19 Mar 2007 09:50:30 -0400 Message-ID: <14677191.1174312231630.JavaMail.root@eastrmwml08.cox.net> Date: Mon, 19 Mar 2007 9:50:31 -0400 From: Ben Taylor MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_17179_10891765.1174312231522" Subject: [Qemu-devel] PATCH Makefile.target cleanup Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu-devel@nongnu.org ------=_Part_17179_10891765.1174312231522 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit This patch cleans up Makefile target for sparc32 and sparc64 Solaris and non-Solaris targets share a large amount of the definitions, so I split out the common parts and isolate just the Solaris/non-Solaris portions and added readability. Also fixed the x86_64 targets for Solaris to not use the loader for linux, and fixed up Sparc64 and ia64 to use $(ARCH) instead of a hard-coded definition for the library. Ben ------=_Part_17179_10891765.1174312231522 Content-Type: text/x-patch; name=qemu-Makefile.target.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=qemu-Makefile.target.diff diff -ruN qemu-ORIG/Makefile.target qemu/Makefile.target --- qemu-ORIG/Makefile.target 2007-03-18 19:23:31.000000000 -0400 +++ qemu/Makefile.target 2007-03-19 09:44:49.714657000 -0400 @@ -109,7 +109,11 @@ endif ifeq ($(ARCH),x86_64) -BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + ifeq ($(CONFIG_SOLARIS),yes) + BASE_LDFLAGS+=-m64 + else + BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + endif endif ifeq ($(ARCH),ppc) @@ -124,25 +128,28 @@ endif ifeq ($(ARCH),sparc) -ifeq ($(CONFIG_SOLARIS),yes) -BASE_CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g2 -ffixed-g3 -BASE_LDFLAGS+=-m32 -OP_CFLAGS+=-fno-delayed-branch -fno-omit-frame-pointer -ffixed-i0 -else -BASE_CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -BASE_LDFLAGS+=-m32 -OP_CFLAGS+=-fno-delayed-branch -ffixed-i0 -HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat -# -static is used to avoid g1/g3 usage by the dynamic linker -BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static -endif + BASE_CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g2 -ffixed-g3 + BASE_LDFLAGS+=-m32 + OP_CFLAGS+=-fno-delayed-branch -ffixed-i0 + ifeq ($(CONFIG_SOLARIS),yes) + OP_CFLAGS+=-fno-omit-frame-pointer + else + BASE_CFLAGS+=-ffixed-g1 -ffixed-g6 + HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat + # -static is used to avoid g1/g3 usage by the dynamic linker + BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static + endif endif ifeq ($(ARCH),sparc64) -BASE_CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 -BASE_LDFLAGS+=-m64 -BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -OP_CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 -fno-delayed-branch -ffixed-i0 + BASE_CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 + DEFINES+=-D__sparc_v9__ + BASE_LDFLAGS+=-m64 + OP_CFLAGS+=-mcpu=ultrasparc -m64 -fno-delayed-branch -ffixed-i0 + ifneq ($(CONFIG_SOLARIS),yes) + BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + OP_CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 + endif endif ifeq ($(ARCH),alpha) @@ -457,14 +464,24 @@ endif ifeq ($(ARCH),ia64) -VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld + VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld endif ifeq ($(ARCH),sparc64) -VL_LDFLAGS+=-m64 -VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc64.ld + VL_LDFLAGS+=-m64 + ifneq ($(CONFIG_SOLARIS),yes) + VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + endif endif +ifeq ($(ARCH),x86_64) + VL_LDFLAGS+=-m64 + ifneq ($(CONFIG_SOLARIS),yes) + VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + endif +endif + + ifdef CONFIG_WIN32 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole endif ------=_Part_17179_10891765.1174312231522--