make/devkit/Tools.gmk
author simonis
Tue, 18 Nov 2014 19:17:16 +0100
changeset 27669 c2c526bc1a18
parent 23428 3c8a05bf4656
child 33029 06a8c5e5959b
permissions -rw-r--r--
8064815: Zero+PPC64: Stack overflow when running Maven Reviewed-by: kvn, simonis Contributed-by: sgehwolf@redhat.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     1
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     2
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     4
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    10
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    15
# accompanied this code).
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    16
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    20
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    23
# questions.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    24
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    25
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    26
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    27
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    28
# Workhorse makefile for creating ONE cross compiler
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    29
# Needs either to be from BUILD -> BUILD OR have
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    30
# BUILD -> HOST prebuilt
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    31
#
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    32
# NOTE: There is a bug here. We don't limit the
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    33
# PATH when building BUILD -> BUILD, which means that
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    34
# if you configure after you've once build the BUILD->BUILD
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    35
# compiler THAT one will be picked up as the compiler for itself.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    36
# This is not so great, especially if you did a partial delete
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    37
# of the target tree.
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    38
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    39
# Fix this...
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    40
#
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    41
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    42
$(info TARGET=$(TARGET))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    43
$(info HOST=$(HOST))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    44
$(info BUILD=$(BUILD))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    45
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    46
ARCH := $(word 1,$(subst -, ,$(TARGET)))
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    47
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    48
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    49
# Define external dependencies
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    50
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    51
# Latest that could be made to work.
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
    52
gcc_ver := gcc-4.8.2
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
    53
binutils_ver := binutils-2.24
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    54
ccache_ver := ccache-3.1.9
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    55
mpfr_ver := mpfr-3.0.1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    56
gmp_ver := gmp-4.3.2
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    57
mpc_ver := mpc-1.0.1
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    58
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    59
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    60
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    61
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    62
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    63
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    64
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    65
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    66
# RPMs in OEL5.5
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
    67
LINUX_VERSION := OEL5.5
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    68
RPM_LIST := \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    69
    kernel-headers \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    70
    glibc-2 glibc-headers glibc-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    71
    cups-libs cups-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    72
    libX11 libX11-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    73
    xorg-x11-proto-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    74
    alsa-lib alsa-lib-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    75
    libXext libXext-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    76
    libXtst libXtst-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    77
    libXrender libXrender-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    78
    freetype freetype-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    79
    libXt libXt-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    80
    libSM libSM-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    81
    libICE libICE-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    82
    libXi libXi-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    83
    libXdmcp libXdmcp-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    84
    libXau libXau-devel \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    85
    libgcc
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    86
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    87
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    88
ifeq ($(ARCH),x86_64)
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    89
  RPM_DIR ?= $(RPM_DIR_x86_64)
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    90
  RPM_ARCHS := x86_64
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    91
  ifeq ($(BUILD),$(HOST))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    92
    ifeq ($(TARGET),$(HOST))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    93
      # When building the native compiler for x86_64, enable mixed mode.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
    94
      RPM_ARCHS += i386 i686
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    95
    endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    96
  endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    97
else
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    98
  RPM_DIR ?= $(RPM_DIR_i686)
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
    99
  RPM_ARCHS := i386 i686
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   100
endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   101
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   102
# Sort to remove duplicates
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   103
RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   104
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   105
ifeq ($(RPM_FILE_LIST),)
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   106
  $(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   107
endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   108
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   109
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   110
# Define common directories and files
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   111
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   112
# Ensure we have 32-bit libs also for x64. We enable mixed-mode.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   113
ifeq (x86_64,$(ARCH))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   114
  LIBDIRS := lib64 lib
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   115
  CFLAGS_lib := -m32
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   116
else
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   117
  LIBDIRS := lib
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   118
endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   119
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   120
# Define directories
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   121
RESULT := $(OUTPUT_ROOT)/result
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   122
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   123
PREFIX := $(RESULT)/$(HOST)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   124
TARGETDIR := $(PREFIX)/$(TARGET)
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   125
SYSROOT := $(TARGETDIR)/sysroot
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   126
DOWNLOAD := $(OUTPUT_ROOT)/download
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   127
SRCDIR := $(OUTPUT_ROOT)/src
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   128
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   129
# Marker file for unpacking rpms
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   130
rpms := $(SYSROOT)/rpms_unpacked
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   131
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   132
# Need to patch libs that are linker scripts to use non-absolute paths
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   133
libs := $(SYSROOT)/libs_patched
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   134
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   135
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   136
# Unpack source packages
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   137
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   138
# Generate downloading + unpacking of sources.
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   139
define Download
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   140
  $(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   141
  $(1)_CFG = $$($(1)_DIR)/configure
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   142
  $(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   143
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   144
  $$($(1)_CFG) : $$($(1)_FILE)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   145
	mkdir -p $$(SRCDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   146
	tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   147
	$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   148
	  echo PATCHING $$(p) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   149
	  patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   150
	)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   151
	touch $$@
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   152
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   153
  $$($(1)_FILE) :
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   154
	wget -P $(DOWNLOAD) $$($(1))
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   155
endef
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   156
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   157
# Download and unpack all source packages
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   158
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   159
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   160
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   161
# Unpack RPMS
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   162
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   163
# Note. For building linux you should install rpm2cpio.
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   164
define unrpm
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   165
  $(SYSROOT)/$(notdir $(1)).unpacked \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   166
    : $(1)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   167
  $$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   168
endef
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   169
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   170
%.unpacked :
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   171
	$(info Unpacking target rpms and libraries from $<)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   172
	@(mkdir -p $(@D); \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   173
	cd $(@D); \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   174
	rpm2cpio $< | \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   175
	    cpio --extract --make-directories \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   176
	        -f \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   177
	        "./usr/share/doc/*" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   178
	        "./usr/share/man/*" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   179
	        "./usr/X11R6/man/*" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   180
	        "*/X11/locale/*" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   181
	    || die ; )
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   182
	touch $@
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   183
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   184
$(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   185
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   186
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   187
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   188
# Note: MUST create a <sysroot>/usr/lib even if not really needed.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   189
# gcc will use a path relative to it to resolve lib64. (x86_64).
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   190
# we're creating multi-lib compiler with 32bit libc as well, so we should
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   191
# have it anyway, but just to make sure...
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   192
# Patch libc.so and libpthread.so to force linking against libraries in sysroot
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   193
# and not the ones installed on the build machine.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   194
$(libs) : $(rpms)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   195
	@echo Patching libc and pthreads
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   196
	@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   197
	  (cat $$f | sed -e 's|/usr/lib64/||g' \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   198
	      -e 's|/usr/lib/||g' \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   199
	      -e 's|/lib64/||g' \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   200
	      -e 's|/lib/||g' ) > $$f.tmp ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   201
	  mv $$f.tmp $$f ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   202
	done)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   203
	@mkdir -p $(SYSROOT)/usr/lib
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   204
	@touch $@
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   205
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   206
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   207
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   208
# Define marker files for each source package to be compiled
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   209
$(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   210
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   211
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   212
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   213
# Default base config
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   214
CONFIG = --target=$(TARGET) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   215
    --host=$(HOST) --build=$(BUILD) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   216
    --prefix=$(PREFIX)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   217
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   218
PATHEXT = $(RESULT)/$(BUILD)/bin:
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   219
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   220
PATHPRE = PATH=$(PATHEXT)$(PATH)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   221
BUILDPAR = -j16
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   222
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   223
# Default commands to when making
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   224
MAKECMD =
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   225
INSTALLCMD = install
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   226
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   227
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   228
declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   229
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   230
ifeq ($(HOST),$(BUILD))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   231
  ifeq ($(HOST),$(TARGET))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   232
    TOOLS = $(call declare_tools,_FOR_TARGET,)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   233
  endif
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   234
endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   235
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   236
TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   237
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   238
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   239
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   240
# Create a TARGET bfd + libiberty only.
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   241
# Configure one or two times depending on mulitlib arch.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   242
# If multilib, the second should be 32-bit, and we resolve
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   243
# CFLAG_<name> to most likely -m32.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   244
define mk_bfd
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   245
  $$(info Libs for $(1))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   246
  $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   247
      : CFLAGS += $$(CFLAGS_$(1))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   248
  $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   249
      : LIBDIRS = --libdir=$(TARGETDIR)/$(1)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   250
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   251
  bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   252
  bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   253
endef
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   254
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   255
# Create one set of bfds etc for each multilib arch
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   256
$(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l))))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   257
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   258
# Only build these two libs.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   259
$(bfdlib) : MAKECMD = all-libiberty all-bfd
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   260
$(bfdlib) : INSTALLCMD = install-libiberty install-bfd
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   261
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   262
# Building targets libbfd + libiberty. HOST==TARGET, i.e not
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   263
# for a cross env.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   264
$(bfdmakes) : CONFIG = --target=$(TARGET) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   265
    --host=$(TARGET) --build=$(BUILD) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   266
    --prefix=$(TARGETDIR) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   267
    --with-sysroot=$(SYSROOT) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   268
    $(LIBDIRS)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   269
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   270
$(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   271
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   272
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   273
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   274
$(gcc) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   275
    $(binutils) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   276
    $(gmp) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   277
    $(mpfr) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   278
    $(mpc) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   279
    $(bfdmakes) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   280
    $(ccache) : ENVS += $(TOOLS)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   281
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   282
# libdir to work around hateful bfd stuff installing into wrong dirs...
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   283
# ensure we have 64 bit bfd support in the HOST library. I.e our
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   284
# compiler on i686 will know 64 bit symbols, BUT later
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   285
# we build just the libs again for TARGET, then with whatever the arch
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   286
# wants.
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   287
$(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   288
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   289
# Makefile creation. Simply run configure in build dir.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   290
$(bfdmakes) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   291
$(BUILDDIR)/$(binutils_ver)/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   292
    : $(BINUTILS_CFG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   293
	$(info Configuring $@. Log in $(@D)/log.config)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   294
	@mkdir -p $(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   295
	( \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   296
	  cd $(@D) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   297
	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   298
	      $(BINUTILS_CFG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   299
	      $(CONFIG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   300
	      --with-sysroot=$(SYSROOT) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   301
	      --disable-nls \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   302
	      --program-prefix=$(TARGET)- \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   303
	      --enable-multilib \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   304
	) > $(@D)/log.config 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   305
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   306
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   307
$(BUILDDIR)/$(mpfr_ver)/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   308
    : $(MPFR_CFG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   309
	$(info Configuring $@. Log in $(@D)/log.config)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   310
	@mkdir -p $(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   311
	( \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   312
	  cd $(@D) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   313
	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   314
	      $(MPFR_CFG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   315
	      $(CONFIG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   316
	      --program-prefix=$(TARGET)- \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   317
	      --enable-shared=no \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   318
	      --with-gmp=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   319
	) > $(@D)/log.config 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   320
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   321
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   322
$(BUILDDIR)/$(gmp_ver)/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   323
    : $(GMP_CFG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   324
	$(info Configuring $@. Log in $(@D)/log.config)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   325
	@mkdir -p $(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   326
	( \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   327
	  cd $(@D) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   328
	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   329
	      $(GMP_CFG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   330
	      --host=$(HOST) --build=$(BUILD) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   331
	      --prefix=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   332
	      --disable-nls \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   333
	      --program-prefix=$(TARGET)- \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   334
	      --enable-shared=no \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   335
	      --with-mpfr=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   336
	) > $(@D)/log.config 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   337
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   338
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   339
$(BUILDDIR)/$(mpc_ver)/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   340
    : $(MPC_CFG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   341
	$(info Configuring $@. Log in $(@D)/log.config)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   342
	@mkdir -p $(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   343
	( \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   344
	  cd $(@D) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   345
	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   346
	      $(MPC_CFG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   347
	      $(CONFIG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   348
	      --program-prefix=$(TARGET)- \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   349
	      --enable-shared=no \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   350
	      --with-mpfr=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   351
	      --with-gmp=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   352
	) > $(@D)/log.config 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   353
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   354
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   355
# Only valid if glibc target -> linux
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   356
# proper destructor handling for c++
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   357
ifneq (,$(findstring linux,$(TARGET)))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   358
  $(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   359
endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   360
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   361
# Want:
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   362
# c,c++
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   363
# shared libs
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   364
# multilib (-m32/-m64 on x64)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   365
# skip native language.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   366
# and link and assemble with the binutils we created
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   367
# earlier, so --with-gnu*
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   368
$(BUILDDIR)/$(gcc_ver)/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   369
    : $(GCC_CFG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   370
	$(info Configuring $@. Log in $(@D)/log.config)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   371
	mkdir -p $(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   372
	( \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   373
	  cd $(@D) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   374
	  $(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   375
	      $(CONFIG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   376
	      --with-sysroot=$(SYSROOT) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   377
	      --enable-languages=c,c++ \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   378
	      --enable-shared \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   379
	      --enable-multilib \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   380
	      --disable-nls \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   381
	      --with-gnu-as \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   382
	      --with-gnu-ld \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   383
	      --with-mpfr=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   384
	      --with-gmp=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   385
	      --with-mpc=$(PREFIX) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   386
	) > $(@D)/log.config 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   387
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   388
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   389
# need binutils for gcc
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   390
$(gcc) : $(binutils)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   391
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   392
# as of 4.3 or so need these for doing config
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   393
$(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   394
$(mpfr) : $(gmp)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   395
$(mpc) : $(gmp) $(mpfr)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   396
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   397
##########################################################################################
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   398
# very straightforward. just build a ccache. it is only for host.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   399
$(BUILDDIR)/$(ccache_ver)/Makefile \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   400
    : $(CCACHE_CFG)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   401
	$(info Configuring $@. Log in $(@D)/log.config)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   402
	@mkdir -p $(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   403
	@( \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   404
	  cd $(@D) ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   405
	  $(PATHPRE) $(ENVS) $(CCACHE_CFG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   406
	      $(CONFIG) \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   407
	) > $(@D)/log.config 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   408
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   409
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   410
gccpatch = $(TARGETDIR)/gcc-patched
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   411
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   412
##########################################################################################
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   413
# For some reason cpp is not created as a target-compiler
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   414
ifeq ($(HOST),$(TARGET))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   415
  $(gccpatch) : $(gcc) link_libs
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   416
	@echo -n 'Creating compiler symlinks...'
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   417
	@for f in cpp; do \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   418
	  if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   419
	  then \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   420
	    cd $(PREFIX)/bin && \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   421
	    ln -s $$f $(TARGET)-$$f ; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   422
	  fi \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   423
	done
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   424
	@touch $@
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   425
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   426
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   427
  ##########################################################################################
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   428
  # Ugly at best. Seems that when we compile host->host compiler, that are NOT
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   429
  # the BUILD compiler, the result will not try searching for libs in package root.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   430
  # "Solve" this by create links from the target libdirs to where they are.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   431
  link_libs:
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   432
	@echo -n 'Creating library symlinks...'
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   433
	@$(foreach l,$(LIBDIRS), \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   434
	for f in `cd $(PREFIX)/$(l) && ls`; do \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   435
	  if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   436
	    mkdir -p $(TARGETDIR)/$(l) && \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   437
	    cd $(TARGETDIR)/$(l)/ && \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   438
	    ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   439
	  fi \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   440
	done;)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   441
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   442
else
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   443
  $(gccpatch) :
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   444
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   445
endif
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   446
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   447
##########################################################################################
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   448
# Build in two steps.
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   449
# make <default>
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   450
# make install.
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   451
# Use path to our build hosts cross tools
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   452
# Always need to build cross tools for build host self.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   453
$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   454
	$(info Building $(basename $@). Log in $(<D)/log.build)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   455
	$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   456
	@echo -n 'installing...'
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   457
	$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   458
	@touch $@
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   459
	@echo 'done'
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   460
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   461
##########################################################################################
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   462
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   463
$(PREFIX)/devkit.info: FRC
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   464
	@echo 'Creating devkit.info in the root of the kit'
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   465
	rm -f $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   466
	touch $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   467
	echo '# This file describes to configure how to interpret the contents of this' >> $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   468
	echo '# devkit' >> $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   469
	echo '' >> $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   470
	echo 'DEVKIT_NAME="$(gcc_ver) - $(LINUX_VERSION)"' >> $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   471
	echo 'DEVKIT_TOOLCHAIN_PATH="$$DEVKIT_ROOT/bin"' >> $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   472
	echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$$host/sysroot"' >> $@
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   473
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   474
##########################################################################################
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   475
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   476
bfdlib : $(bfdlib)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   477
binutils : $(binutils)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   478
rpms : $(rpms)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   479
libs : $(libs)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   480
sysroot : rpms libs
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   481
gcc : sysroot $(gcc) $(gccpatch)
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   482
all : binutils gcc bfdlib $(PREFIX)/devkit.info
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   483
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   484
# this is only built for host. so separate.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   485
ccache : $(ccache)
18021
680b9b43e2d6 8015377: Support using compiler devkits on Linux
erikj
parents:
diff changeset
   486
23428
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   487
# Force target
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   488
FRC:
3c8a05bf4656 8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents: 21759
diff changeset
   489
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 18021
diff changeset
   490
.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot