Christian Wiese
13 years ago
3 changed files with 85 additions and 1 deletions
@ -0,0 +1,64 @@
|
||||
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||
#
|
||||
# Filename: package/.../open-iscsi/open-iscsi-cross-compile.patch
|
||||
# Copyright (C) 2012 The OpenSDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||
|
||||
Extend the Makefile to be able to cross-compile open-iscsi
|
||||
|
||||
When cross-compiling you have to pass following with the make call:
|
||||
|
||||
1. CROSS_COMPILE=1
|
||||
2. CROSS_BUILD_TYPE=target-triplet of the system on which the package is being
|
||||
configured and compiled
|
||||
3. CROSS_BUILD_HOST=target-triplet of the system on which the package will run
|
||||
|
||||
For more information check out:
|
||||
|
||||
http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets
|
||||
|
||||
--- a/Makefile 2012-05-21 02:59:24.000000000 +0200
|
||||
+++ b/Makefile 2012-08-09 23:54:55.121814352 +0200
|
||||
@@ -20,6 +20,23 @@
|
||||
ETCFILES = etc/iscsid.conf
|
||||
IFACEFILES = etc/iface.example
|
||||
|
||||
+# options passed to the configure script of open-isns
|
||||
+ISNS_CONFOPTS =
|
||||
+
|
||||
+# cross-compile options for open-isns
|
||||
+ifneq ($(CROSS_COMPILE),)
|
||||
+ifneq ($(CROSS_BUILD_TYPE),)
|
||||
+ISNS_CONFOPTS += --build=$(CROSS_BUILD_TYPE)
|
||||
+else
|
||||
+$(error you need to pass CROSS_BUILD_TYPE when cross-compiling)
|
||||
+endif
|
||||
+ifneq ($(CROSS_HOST_TYPE),)
|
||||
+ISNS_CONFOPTS += --host=$(CROSS_HOST_TYPE)
|
||||
+else
|
||||
+$(error you need to pass CROSS_HOST_TYPE when cross-compiling)
|
||||
+endif
|
||||
+endif
|
||||
+
|
||||
# Random comments:
|
||||
# using '$(MAKE)' instead of just 'make' allows make to run in parallel
|
||||
# over multiple makefile.
|
||||
@@ -42,7 +59,7 @@
|
||||
@echo "Read README file for detailed information."
|
||||
|
||||
utils/open-isns/Makefile: utils/open-isns/configure utils/open-isns/Makefile.in
|
||||
- cd utils/open-isns; ./configure CFLAGS="$(OPTFLAGS)" --with-security=no
|
||||
+ cd utils/open-isns; ./configure CFLAGS="$(OPTFLAGS)" $(ISNS_CONFOPTS) --with-security=no
|
||||
|
||||
kernel: force
|
||||
$(MAKE) -C kernel
|
@ -0,0 +1,20 @@
|
||||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
# |
||||
# Filename: package/.../open-iscsi/open-iscsi.conf |
||||
# Copyright (C) 2012 The OpenSDE Project |
||||
# |
||||
# More information can be found in the files COPYING and README. |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; version 2 of the License. A copy of the |
||||
# GNU General Public License can be found in the file COPYING. |
||||
# --- SDE-COPYRIGHT-NOTE-END --- |
||||
|
||||
# cross-compile help |
||||
if atstage cross; then |
||||
var_append makeopt ' ' "CROSS_COMPILE=1" |
||||
var_append makeopt ' ' "CROSS_BUILD_TYPE=$arch_build" |
||||
var_append makeopt ' ' "CROSS_HOST_TYPE=$arch_target" |
||||
fi |
Loading…
Reference in new issue