mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings.
@ 2012-03-19 21:14 Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 2/9 v2] [x86_64] libgcc need to be install in /lib64 instead of /lib Remy Bohmer
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

The ARCH_X86_64 architecture is added as subtype of ARCH_X86 since it
basically is the same architecture, and a mix of both architectures
will be required to allow multilib support in a later commit.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 platforms/architecture.in |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/platforms/architecture.in b/platforms/architecture.in
index ed36e8a..f00108e 100644
--- a/platforms/architecture.in
+++ b/platforms/architecture.in
@@ -181,6 +181,16 @@ choice
 
 endchoice
 
+if ARCH_X86
+#
+# 32/64 bits platform
+#
+config ARCH_X86_64
+	bool "64 bit architecture"
+	help
+	  Select this option if you build for a 64 bit architecture.
+
+endif
 
 #
 # endianess
@@ -263,7 +273,7 @@ config HAS_MMU
 config SIZEOF_LONG_DOUBLE
 	string
 	default "12" if ARCH_X86
-#	default "16" if ARCH_X86_64
+	default "16" if ARCH_X86_64
 	default "8"
 	# FIXME: add more values
 
@@ -277,7 +287,8 @@ config ARCH_STRING
 	default "avr32"			if ARCH_AVR32
 	default "alpha"			if ARCH_ALPHA
 	default "blackfin"		if ARCH_BLACKFIN
-	default "i386"			if ARCH_X86
+	default "i386"			if ARCH_X86 && !ARCH_X86_64
+	default "x86_64"		if ARCH_X86 && ARCH_X86_64
 	default "i386"			if ARCH_MINGW
 	default "m68k"			if ARCH_M68K
 	default "ppc"			if ARCH_PPC
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 2/9 v2] [x86_64] libgcc need to be install in /lib64 instead of /lib
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make Remy Bohmer
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

Let install_copy_toolchain itself figure out where to install the
libgcc libraries and its friends.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/gcclibs.make |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/gcclibs.make b/rules/gcclibs.make
index 60c474c..a1079c2 100644
--- a/rules/gcclibs.make
+++ b/rules/gcclibs.make
@@ -36,15 +36,15 @@ $(STATEDIR)/gcclibs.targetinstall:
 	@$(call install_fixup, gcclibs,DESCRIPTION,missing)
 
 ifdef PTXCONF_GCCLIBS_GCC_S
-	@$(call install_copy_toolchain_lib, gcclibs, libgcc_s.so, /lib)
+	@$(call install_copy_toolchain_lib, gcclibs, libgcc_s.so)
 endif
 
 ifdef PTXCONF_GCCLIBS_CXX
-	@$(call install_copy_toolchain_lib, gcclibs, libstdc++.so, /usr/lib)
+	@$(call install_copy_toolchain_lib, gcclibs, libstdc++.so)
 endif
 
 ifdef PTXCONF_GCCLIBS_GCJ
-	@$(call install_copy_toolchain_lib, gcclibs, libgcj.so, /usr/lib)
+	@$(call install_copy_toolchain_lib, gcclibs, libgcj.so)
 endif
 
 	@$(call install_finish, gcclibs)
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 2/9 v2] [x86_64] libgcc need to be install in /lib64 instead of /lib Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-23  7:42   ` Michael Olbrich
  2012-03-19 21:14 ` [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place Remy Bohmer
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

These hardcoded paths do not work for a multilib environment where
libraries are typically installed in /lib64 for x86-64 instead of /lib
All correct paths can be found by interrogating the compiler toolchain
for the location of these files.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/glibc.make                  |   23 +++++++++++------------
 rules/post/install.make           |   18 ++++++------------
 scripts/install_copy_toolchain.sh |   20 +++++++++++++-------
 3 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/rules/glibc.make b/rules/glibc.make
index 2de7a13..0d110ef 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -104,33 +104,32 @@ ifdef PTXCONF_GLIBC_NSL
 endif
 
 ifdef PTXCONF_GLIBC_GCONF_BASE
-	@$(call install_copy, glibc, 0, 0, 0755, /usr/lib/gconv)
-	@$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules, /usr/lib/gconv, n)
+	@$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules, n)
 endif
 
 ifdef PTXCONF_GLIBC_GCONV_DEF
-	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so, /usr/lib/gconv)
-	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so, /usr/lib/gconv)
+	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so)
+	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so)
 endif
 
 ifdef PTXCONF_GLIBC_GCONV_UTF
-	@$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so, /usr/lib/gconv)
-	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so, /usr/lib/gconv)
-	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so, /usr/lib/gconv)
-	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so, /usr/lib/gconv)
+	@$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so)
+	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so)
+	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so)
+	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so)
 endif
 
 ifdef PTXCONF_GLIBC_GCONV_ZH
-	@$(call install_copy_toolchain_lib, glibc, gconv/GBBIG5.so, /usr/lib/gconv)
-	@$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so, /usr/lib/gconv)
+	@$(call install_copy_toolchain_lib, glibc, gconv/GBBIG5.so)
+	@$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so)
 endif
 
 ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
-	@$(call install_copy_toolchain_usr, glibc, bin/locale)
+	@$(call install_copy_toolchain_lib, glibc, bin/locale)
 endif
 
 ifdef PTXCONF_GLIBC_I18N_BIN_LOCALEDEF
-	@$(call install_copy_toolchain_usr, glibc, bin/localedef)
+	@$(call install_copy_toolchain_lib, glibc, bin/localedef)
 endif
 
 ifdef PTXCONF_GLIBC_I18N_RAWDATA
diff --git a/rules/post/install.make b/rules/post/install.make
index 190ec28..cfc73a4 100644
--- a/rules/post/install.make
+++ b/rules/post/install.make
@@ -300,18 +300,15 @@ install_script_replace = \
 #
 # $1: xpkg label
 # $2: source
-# $3: destination
-# $4: strip (y|n)	default is to strip
+# $3: strip (y|n)	default is to strip
 #
 install_copy_toolchain_lib =									\
 	XPKG=$(subst _,-,$(strip $(1)));							\
 	LIB="$(strip $2)";									\
-	DST="$(strip $3)";									\
-	STRIP="$(strip $4)";									\
-	test "$${DST}" != "" && DST="-d $${DST}";						\
+	STRIP="$(strip $3)";									\
 	$(call install_check, install_copy_toolchain_lib);					\
 	${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)"					\
-		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l "$${LIB}" $${DST} -s "$${STRIP}"
+		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l "$${LIB}" -s "$${STRIP}"
 
 #
 # install_copy_toolchain_dl
@@ -331,18 +328,15 @@ install_copy_toolchain_dl =									\
 #
 # $1: xpkg label
 # $2: source
-# $3: destination
-# $4: strip (y|n)	default is to strip
+# $3: strip (y|n)	default is to strip
 #
 install_copy_toolchain_usr =									\
 	XPKG=$(subst _,-,$(strip $(1)));							\
 	LIB="$(strip $2)";									\
-	DST="$(strip $3)";									\
-	STRIP="$(strip $4)";									\
-	test "$${DST}" != "" && DST="-d $${DST}";						\
+	STRIP="$(strip $3)";									\
 	$(call install_check, install_copy_toolchain_other);					\
 	${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)"					\
-		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -u "$${LIB}" $${DST} -s "$${STRIP}"
+		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -u "$${LIB}" -s "$${STRIP}"
 
 #
 # install_link
diff --git a/scripts/install_copy_toolchain.sh b/scripts/install_copy_toolchain.sh
index 726cc61..27e0a9e 100755
--- a/scripts/install_copy_toolchain.sh
+++ b/scripts/install_copy_toolchain.sh
@@ -50,7 +50,7 @@ ptxd_abs2rel() {
 # out: $lib_path
 #
 ptxd_get_lib_path() {
-    local lib lib_dir lib_path extra_cflags
+    local lib lib_dir lib_path extra_cppflags extra_cflags
 
     lib="${1}"
     extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
@@ -78,7 +78,7 @@ ptxd_get_lib_path() {
 # out: dynamic linker name
 #
 ptxd_get_dl() {
-    local dl
+    local dl extra_cppflags extra_cflags
     extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
     extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
 
@@ -106,7 +106,7 @@ ptxd_split_lib_prefix_sysroot_eval() {
     lib_dir="${lib_path%/${lib}}"		# abs path to that lib
 
     # try to identify sysroot part of that path
-    for prefix in {/usr,}/lib{64,32,}{/tls,} ""; do
+    for prefix in {/usr,}/lib{64,32,}{/tls,/gconv,/bin,} ""; do
 	tmp="${lib_dir%${prefix}}"
 	if test "${lib_dir}" != "${tmp}"; then
 	    break
@@ -241,10 +241,13 @@ ptxd_install_toolchain_lib() {
 
 
 _ptxd_get_sysroot_usr_by_sysroot() {
-    local sysroot
+    local sysroot extra_cppflags extra_cflags
+
+    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
+    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
 
     sysroot="$(echo 'int main(void){return 0;}' | \
-	${CC} -x c -o /dev/null -v - 2>&1 | \
+	${CC} ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
 	sed -ne "/.*collect2.*/s,.*--sysroot=\([^[:space:]]*\).*,\1,p")"
 
     test -n "${sysroot}" || return 1
@@ -254,9 +257,12 @@ _ptxd_get_sysroot_usr_by_sysroot() {
 
 
 _ptxd_get_sysroot_usr_by_progname() {
-    local prog_name
+    local prog_name extra_cppflags extra_cflags
+
+    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
+    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
 
-    prog_name="$(${CC} -print-prog-name=gcc)"
+    prog_name="$(${CC} ${extra_cppflags} ${extra_cflags} -print-prog-name=gcc)"
     case "${prog_name}" in
 	/*)
 	    prog_name="$(ptxd_abspath ${prog_name%/bin/gcc})"
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 2/9 v2] [x86_64] libgcc need to be install in /lib64 instead of /lib Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-24 11:04   ` Michael Olbrich
  2012-03-19 21:14 ` [ptxdist] [PATCH 5/9 v2] [x86_64, multilib] Install Zlib " Remy Bohmer
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

While cross-compiling for x86_64 in a multilib configuration we need to
install the libraries conform the Filesystem Hierarchy Standard (FHS).
Summarised this will be for multilib:
* All libraries compiled for and used in 64-bit applications need to be
  installed in /lib64 or /usr/lib64.
* All libraries compiled for and used in 32-bit applications need to be
  installed in /lib or /usr/lib.
* All executables will still find its way in the regular /bin and /sbin
  paths.
* The Operating System itself and all its libraries should only be compiled
  in 64 bit mode. It should not be a mix between 32 and 64 bit libraries.
  32 bit support will only contain the libraries that are required by
  32-bit-applications to link against.

This is also conform what many distros derived from Redhat have in their
setup. Note that Debian based distros follow a somewhat different setup.

Note that we use the compiler toolchain to tell us at which paths we
need to install the libraries. This means that if you build for a x86_64
target _without_ multilib support the libraries will likely end up in the
classical /lib and /usr/lib directories, but that is completely steered
by the compiler toolchain configuration. (it follows the location where
the corresponding dynamic linker is expected to be installed)

So, this change makes ptxdist follow the sysroot of the compiler toolchain
more such that preliminary multilib support can be achieved. Preliminary
in the sense that only still one C-library is being installed.
In another changeset the support for a 2nd C-library installation will be
added. At least after this change (and a few subsequent ptxdist makefile
fixes) the /lib and /usr/lib area will only contain the contents that belong
there in multilib environment.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: Fixed uClibc dynamic linker name resolving
     Reworked review remarks from Michael Olbrich:
     - Do not add fix paths to lib64, but get them from ptxd_get_lib_dir
     - Call ptxd_get_lib_dir from the shell script in the make files

 rules/pre/Rules.make              |    4 +++-
 scripts/lib/ptxd_make_00-init.sh  |   31 +++++++++++++++++++++++++++----
 scripts/lib/ptxd_make_xpkg_pkg.sh |    7 +++++--
 3 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index 1d6da52..018c815 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -174,6 +174,8 @@ CROSS_ENV_PROGS := \
 	$(CROSS_ENV_CPP_FOR_BUILD) \
 	$(CROSS_ENV_LINK_FOR_BUILD)
 
+CROSS_LIB_DIR   := $(shell ptxd_get_lib_dir)
+
 #
 # prepare to use pkg-config with wrapper which takes care of
 # $(PTXDIST_SYSROOT_TARGET). The wrapper's magic doesn't work when
@@ -266,7 +268,7 @@ CROSS_ENV := \
 #
 
 CROSS_AUTOCONF_SYSROOT_USR := \
-	--prefix=/usr --sysconfdir=/etc --localstatedir=/var
+	--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/$(CROSS_LIB_DIR)
 
 CROSS_AUTOCONF_SYSROOT_ROOT := \
 	--prefix=
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index da72d29..a13369c 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -63,7 +63,10 @@ ptxd_init_arch() {
 # out:	PTXDIST_SYSROOT_TOOLCHAIN
 #
 ptxd_init_sysroot_toolchain() {
-    local compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
+    local compiler_prefix extra_cppflags extra_cflags
+    compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
+    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
+    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
 
     #
     # no compiler prefix specified means using plain "gcc"
@@ -75,7 +78,7 @@ ptxd_init_sysroot_toolchain() {
 	local sysroot
 
 	sysroot="$(echo 'int main(void){return 0;}' | \
-	${compiler_prefix}gcc -x c -o /dev/null -v - 2>&1 | \
+	${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
 	sed -ne "/.*collect2.*/s,.*--sysroot=\([^[:space:]]*\).*,\1,p" && \
 	check_pipe_status)"
 
@@ -119,6 +122,23 @@ ptxd_init_collectionconfig() {
 
 
 #
+# out: 'lib' or 'lib64', derived from the ld-{linux,uClibc}.so.? from the compiler toolchain
+#
+ptxd_get_lib_dir() {
+    local dl lib_dir extra_cppflags extra_cflags
+    compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
+    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
+    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
+
+    dl="$(echo 'int main(void){return 0;}' | \
+	${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
+	sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"
+    lib_dir="${dl%%/ld-*.so.*}"
+    echo "${lib_dir#/}"
+}
+export -f ptxd_get_lib_dir
+
+#
 # setup compiler and pkgconfig environment
 #
 # in:
@@ -140,6 +160,9 @@ ptxd_init_cross_env() {
     prefix=( ${PTXDIST_PATH_SYSROOT_PREFIX} )
     IFS="${orig_IFS}"
 
+    local -a lib_dir
+    lib_dir=$(ptxd_get_lib_dir)
+
     # add "-isystem <DIR>/include"
     local -a cppflags
     cppflags=( "${prefix[@]/%//include}" )
@@ -147,7 +170,7 @@ ptxd_init_cross_env() {
 
     # add "-L<DIR>/lib -Wl,-rpath-link -Wl,<DIR>"
     local -a ldflags
-    ldflags=( "${prefix[@]/%//lib}" )
+    ldflags=( "${prefix[@]/%//${lib_dir}}" )
     ldflags=( "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
 
     export \
@@ -166,7 +189,7 @@ ptxd_init_cross_env() {
 
     # add <DIR>/lib/pkgconfig and <DIR>/share/pkgconfig
     local -a pkg_libdir
-    pkg_libdir=( "${prefix[@]/%//lib/pkgconfig}" "${prefix[@]/%//share/pkgconfig}" )
+    pkg_libdir=( "${prefix[@]/%//${lib_dir}/pkgconfig}" "${prefix[@]/%//share/pkgconfig}" )
 
     #
     # PKG_CONFIG_PATH contains additional pkg-config search
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index c03f19e..73ff2c2 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -597,6 +597,8 @@ ptxd_install_spec() {
 export -f ptxd_install_spec
 
 ptxd_install_package() {
+    local lib_dir=$(ptxd_get_lib_dir)
+
     for dir in "${pkg_pkg_dir}/"{,usr/}{bin,sbin,libexec}; do
 	find "${dir}" \( -type f -o -type l \) \
 		    -perm /111 2>/dev/null | while read file; do
@@ -605,7 +607,7 @@ ptxd_install_package() {
 	done
     done
 
-    for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
+    for dir in "${pkg_pkg_dir}/"{,usr/}${lib_dir}; do
 	find "${dir}" \( -type f -o -type l \) \
 		    -a -name "*.so*" 2>/dev/null | while read file; do
 	    ptxd_install_generic - "${file#${pkg_pkg_dir}}" ||
@@ -635,10 +637,11 @@ ptxd_install_shared() {
 export -f ptxd_install_shared
 
 ptxd_install_lib() {
+    local lib_dir=$(ptxd_get_lib_dir)
     local lib="$1"
     shift
 
-    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
+    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}${lib_dir}; do
 	    find "${dir}" -type f -path "${dir}/${lib}.so*"; done 2>/dev/null)"
 
     if [ ! -f "${file}" ]; then
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 5/9 v2] [x86_64, multilib] Install Zlib libraries at the right place
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
                   ` (2 preceding siblings ...)
  2012-03-19 21:14 ` [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 6/9 v2] [x86_64, multilib] Install Ncurses " Remy Bohmer
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/zlib.make |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/rules/zlib.make b/rules/zlib.make
index 1618e1b..2c15ccb 100644
--- a/rules/zlib.make
+++ b/rules/zlib.make
@@ -48,7 +48,8 @@ ZLIB_CONF_ENV := \
 #
 ZLIB_AUTOCONF := \
 	--prefix=/usr \
-	--uname=Linux
+	--uname=Linux \
+	--libdir=/usr/$(CROSS_LIB_DIR)
 
 ifdef PTXCONF_ZLIB_STATIC
 ZLIB_AUTOCONF += --static
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 6/9 v2] [x86_64, multilib] Install Ncurses libraries at the right place
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
                   ` (3 preceding siblings ...)
  2012-03-19 21:14 ` [ptxdist] [PATCH 5/9 v2] [x86_64, multilib] Install Zlib " Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 7/9 v2] [x86_64, multilib] Install Util-linux-ng " Remy Bohmer
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/ncurses.make |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/rules/ncurses.make b/rules/ncurses.make
index 19247bd..bf25512 100644
--- a/rules/ncurses.make
+++ b/rules/ncurses.make
@@ -37,7 +37,7 @@ NCURSES_AUTOCONF_SHARED := \
 	--disable-nls \
 	--enable-const \
 	--enable-overwrite \
-	--libdir=/lib \
+	--libdir=/$(CROSS_LIB_DIR) \
 	--with-debug \
 	--with-normal \
 	--with-shared \
@@ -115,9 +115,9 @@ ifdef PTXCONF_NCURSES_WIDE_CHAR
 # For this, the links at runtime are required
 #
 	for lib in $(NCURSES_LIBRARY_LIST); do \
-		echo "INPUT(-l$${lib}w)" > $(NCURSES_PKGDIR)/lib/lib$${lib}.so ; \
+		echo "INPUT(-l$${lib}w)" > $(NCURSES_PKGDIR)/$(CROSS_LIB_DIR)/lib$${lib}.so ; \
 	done
-	ln -sf libncurses++w.a $(NCURSES_PKGDIR)/lib/libncurses++.a
+	ln -sf libncurses++w.a $(NCURSES_PKGDIR)/$(CROSS_LIB_DIR)/libncurses++.a
 
 	ln -sf -- "ncursesw$(NCURSES_MAJOR)-config" \
 		"$(NCURSES_PKGDIR)/usr/bin/ncurses$(NCURSES_MAJOR)-config"
@@ -147,22 +147,22 @@ $(STATEDIR)/ncurses.targetinstall:
 
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
 	@$(call install_link, ncurses, libncursesw.so.$(NCURSES_VERSION), \
-		/lib/libncurses.so.$(NCURSES_VERSION))
+		/$(CROSS_LIB_DIR)/libncurses.so.$(NCURSES_VERSION))
 	@$(call install_link, ncurses, libncursesw.so.$(NCURSES_VERSION), \
-		/lib/libncurses.so.$(NCURSES_MAJOR))
+		/$(CROSS_LIB_DIR)/libncurses.so.$(NCURSES_MAJOR))
 	@$(call install_link, ncurses, libncursesw.so.$(NCURSES_VERSION), \
-		/lib/libncurses.so)
+		/$(CROSS_LIB_DIR)/libncurses.so)
 endif
 
 ifdef PTXCONF_NCURSES_FORM
 	@$(call install_lib, ncurses, 0, 0, 0644, libform$(NCURSES_WIDE))
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
 	@$(call install_link, ncurses, libformw.so.$(NCURSES_VERSION), \
-		/lib/libform.so.$(NCURSES_VERSION))
+		/$(CROSS_LIB_DIR)/libform.so.$(NCURSES_VERSION))
 	@$(call install_link, ncurses, libformw.so.$(NCURSES_VERSION), \
-		/lib/libform.so.$(NCURSES_MAJOR))
+		/$(CROSS_LIB_DIR)/libform.so.$(NCURSES_MAJOR))
 	@$(call install_link, ncurses, libformw.so.$(NCURSES_VERSION), \
-		/lib/libform.so)
+		/$(CROSS_LIB_DIR)/libform.so)
 endif
 endif
 
@@ -171,11 +171,11 @@ ifdef PTXCONF_NCURSES_MENU
 	@$(call install_lib, ncurses, 0, 0, 0644, libmenu$(NCURSES_WIDE))
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
 	@$(call install_link, ncurses, libmenuw.so.$(NCURSES_VERSION), \
-		/lib/libmenu.so.$(NCURSES_VERSION))
+		/$(CROSS_LIB_DIR)/libmenu.so.$(NCURSES_VERSION))
 	@$(call install_link, ncurses, libmenuw.so.$(NCURSES_VERSION), \
-		/lib/libmenu.so.$(NCURSES_MAJOR))
+		/$(CROSS_LIB_DIR)/libmenu.so.$(NCURSES_MAJOR))
 	@$(call install_link, ncurses, libmenuw.so.$(NCURSES_VERSION), \
-		/lib/libmenu.so)
+		/$(CROSS_LIB_DIR)/libmenu.so)
 endif
 endif
 
@@ -184,11 +184,11 @@ ifdef PTXCONF_NCURSES_PANEL
 	@$(call install_lib, ncurses, 0, 0, 0644, libpanel$(NCURSES_WIDE))
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
 	@$(call install_link, ncurses, libpanelw.so.$(NCURSES_VERSION), \
-		/lib/libpanel.so.$(NCURSES_VERSION))
+		/$(CROSS_LIB_DIR)/libpanel.so.$(NCURSES_VERSION))
 	@$(call install_link, ncurses, libpanelw.so.$(NCURSES_VERSION), \
-		/lib/libpanel.so.$(NCURSES_MAJOR))
+		/$(CROSS_LIB_DIR)/libpanel.so.$(NCURSES_MAJOR))
 	@$(call install_link, ncurses, libpanelw.so.$(NCURSES_VERSION), \
-		/lib/libpanel.so)
+		/$(CROSS_LIB_DIR)/libpanel.so)
 endif
 endif
 
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 7/9 v2] [x86_64, multilib] Install Util-linux-ng libraries at the right place
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
                   ` (4 preceding siblings ...)
  2012-03-19 21:14 ` [ptxdist] [PATCH 6/9 v2] [x86_64, multilib] Install Ncurses " Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 8/9 v2] [x86_64, multilib] Install Readline " Remy Bohmer
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

Notice that CROSS_AUTOCONF_USR contains --libdir=/usr/lib{,64} setting.
We want this library in /lib{,64} so we override this setting here
explicitly.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/util-linux-ng.make |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rules/util-linux-ng.make b/rules/util-linux-ng.make
index d9a3651..45bb9c2 100644
--- a/rules/util-linux-ng.make
+++ b/rules/util-linux-ng.make
@@ -45,6 +45,7 @@ UTIL_LINUX_NG_ENV 	:= \
 #
 UTIL_LINUX_NG_AUTOCONF := \
 	$(CROSS_AUTOCONF_USR) \
+	--libdir=/$(CROSS_LIB_DIR) \
 	--enable-shared \
 	--disable-static \
 	--disable-gtk-doc \
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 8/9 v2] [x86_64, multilib] Install Readline libraries at the right place
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
                   ` (5 preceding siblings ...)
  2012-03-19 21:14 ` [ptxdist] [PATCH 7/9 v2] [x86_64, multilib] Install Util-linux-ng " Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-19 21:14 ` [ptxdist] [PATCH 9/9 v2] [x86_64, multilib] Install Procps " Remy Bohmer
  2012-03-23  7:53 ` [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Michael Olbrich
  8 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/readline.make |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/rules/readline.make b/rules/readline.make
index d5a8ec0..6e6c55a 100644
--- a/rules/readline.make
+++ b/rules/readline.make
@@ -41,7 +41,8 @@ READLINE_AUTOCONF := \
 	$(CROSS_AUTOCONF_ROOT) \
 	--enable-shared \
 	--disable-static\
-	--disable-multibyte
+	--disable-multibyte \
+	--libdir=/$(CROSS_LIB_DIR)
 
 ifdef PTXCONF_READLINE_TERMCAP
 READLINE_AUTOCONF += --without-curses
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [ptxdist] [PATCH 9/9 v2] [x86_64, multilib] Install Procps libraries at the right place
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
                   ` (6 preceding siblings ...)
  2012-03-19 21:14 ` [ptxdist] [PATCH 8/9 v2] [x86_64, multilib] Install Readline " Remy Bohmer
@ 2012-03-19 21:14 ` Remy Bohmer
  2012-03-23  7:53 ` [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Michael Olbrich
  8 siblings, 0 replies; 17+ messages in thread
From: Remy Bohmer @ 2012-03-19 21:14 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 v2: no changes since v1

 rules/procps.make |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/rules/procps.make b/rules/procps.make
index 7ab3786..44d7ea5 100644
--- a/rules/procps.make
+++ b/rules/procps.make
@@ -51,7 +51,7 @@ PROCPS_MAKEVARS	:= \
 	CFLAGS=-O2 \
 	CPPFLAGS='$(CROSS_CPPFLAGS)' \
 	LDFLAGS='$(CROSS_LDFLAGS)' \
-	lib64=lib \
+	lib64=$(CROSS_LIB_DIR) \
 	ldconfig=true \
 	MANFILES="" \
 	BINFILES="$(PROCPS_ALL-y)"
@@ -73,8 +73,7 @@ $(STATEDIR)/procps.targetinstall:
 	@$(call install_fixup, procps,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup, procps,DESCRIPTION,missing)
 
-	@$(call install_copy, procps, 0, 0, 0644, -, \
-		/lib/libproc-3.2.8.so)
+	@$(call install_lib, procps, 0, 0, 0644, libproc-3.2.8)
 
 ifdef PTXCONF_PROCPS_TOP
 	@$(call install_copy, procps, 0, 0, 0755, -,\
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make
  2012-03-19 21:14 ` [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make Remy Bohmer
@ 2012-03-23  7:42   ` Michael Olbrich
  2012-03-24 18:24     ` Remy Bohmer
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Olbrich @ 2012-03-23  7:42 UTC (permalink / raw)
  To: ptxdist

On Mon, Mar 19, 2012 at 10:14:46PM +0100, Remy Bohmer wrote:
> These hardcoded paths do not work for a multilib environment where
> libraries are typically installed in /lib64 for x86-64 instead of /lib
> All correct paths can be found by interrogating the compiler toolchain
> for the location of these files.

Can't you use $(CROSS_LIB_DIR) here? I'd like to avoid larger changes to
install_copy_toolchain.sh. This depends a lot on the toolchain and is
rather difficult to test.

Michael

> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
>  v2: no changes since v1
> 
>  rules/glibc.make                  |   23 +++++++++++------------
>  rules/post/install.make           |   18 ++++++------------
>  scripts/install_copy_toolchain.sh |   20 +++++++++++++-------
>  3 files changed, 30 insertions(+), 31 deletions(-)
> 
> diff --git a/rules/glibc.make b/rules/glibc.make
> index 2de7a13..0d110ef 100644
> --- a/rules/glibc.make
> +++ b/rules/glibc.make
> @@ -104,33 +104,32 @@ ifdef PTXCONF_GLIBC_NSL
>  endif
>  
>  ifdef PTXCONF_GLIBC_GCONF_BASE
> -	@$(call install_copy, glibc, 0, 0, 0755, /usr/lib/gconv)
> -	@$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules, /usr/lib/gconv, n)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/gconv-modules, n)
>  endif
>  
>  ifdef PTXCONF_GLIBC_GCONV_DEF
> -	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so, /usr/lib/gconv)
> -	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so, /usr/lib/gconv)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-1.so)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/ISO8859-15.so)
>  endif
>  
>  ifdef PTXCONF_GLIBC_GCONV_UTF
> -	@$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so, /usr/lib/gconv)
> -	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so, /usr/lib/gconv)
> -	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so, /usr/lib/gconv)
> -	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so, /usr/lib/gconv)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/UNICODE.so)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-16.so)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-32.so)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/UTF-7.so)
>  endif
>  
>  ifdef PTXCONF_GLIBC_GCONV_ZH
> -	@$(call install_copy_toolchain_lib, glibc, gconv/GBBIG5.so, /usr/lib/gconv)
> -	@$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so, /usr/lib/gconv)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/GBBIG5.so)
> +	@$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so)
>  endif
>  
>  ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
> -	@$(call install_copy_toolchain_usr, glibc, bin/locale)
> +	@$(call install_copy_toolchain_lib, glibc, bin/locale)
>  endif
>  
>  ifdef PTXCONF_GLIBC_I18N_BIN_LOCALEDEF
> -	@$(call install_copy_toolchain_usr, glibc, bin/localedef)
> +	@$(call install_copy_toolchain_lib, glibc, bin/localedef)
>  endif
>  
>  ifdef PTXCONF_GLIBC_I18N_RAWDATA
> diff --git a/rules/post/install.make b/rules/post/install.make
> index 190ec28..cfc73a4 100644
> --- a/rules/post/install.make
> +++ b/rules/post/install.make
> @@ -300,18 +300,15 @@ install_script_replace = \
>  #
>  # $1: xpkg label
>  # $2: source
> -# $3: destination
> -# $4: strip (y|n)	default is to strip
> +# $3: strip (y|n)	default is to strip
>  #
>  install_copy_toolchain_lib =									\
>  	XPKG=$(subst _,-,$(strip $(1)));							\
>  	LIB="$(strip $2)";									\
> -	DST="$(strip $3)";									\
> -	STRIP="$(strip $4)";									\
> -	test "$${DST}" != "" && DST="-d $${DST}";						\
> +	STRIP="$(strip $3)";									\
>  	$(call install_check, install_copy_toolchain_lib);					\
>  	${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)"					\
> -		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l "$${LIB}" $${DST} -s "$${STRIP}"
> +		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l "$${LIB}" -s "$${STRIP}"
>  
>  #
>  # install_copy_toolchain_dl
> @@ -331,18 +328,15 @@ install_copy_toolchain_dl =									\
>  #
>  # $1: xpkg label
>  # $2: source
> -# $3: destination
> -# $4: strip (y|n)	default is to strip
> +# $3: strip (y|n)	default is to strip
>  #
>  install_copy_toolchain_usr =									\
>  	XPKG=$(subst _,-,$(strip $(1)));							\
>  	LIB="$(strip $2)";									\
> -	DST="$(strip $3)";									\
> -	STRIP="$(strip $4)";									\
> -	test "$${DST}" != "" && DST="-d $${DST}";						\
> +	STRIP="$(strip $3)";									\
>  	$(call install_check, install_copy_toolchain_other);					\
>  	${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)"					\
> -		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -u "$${LIB}" $${DST} -s "$${STRIP}"
> +		$(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -u "$${LIB}" -s "$${STRIP}"
>  
>  #
>  # install_link
> diff --git a/scripts/install_copy_toolchain.sh b/scripts/install_copy_toolchain.sh
> index 726cc61..27e0a9e 100755
> --- a/scripts/install_copy_toolchain.sh
> +++ b/scripts/install_copy_toolchain.sh
> @@ -50,7 +50,7 @@ ptxd_abs2rel() {
>  # out: $lib_path
>  #
>  ptxd_get_lib_path() {
> -    local lib lib_dir lib_path extra_cflags
> +    local lib lib_dir lib_path extra_cppflags extra_cflags
>  
>      lib="${1}"
>      extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> @@ -78,7 +78,7 @@ ptxd_get_lib_path() {
>  # out: dynamic linker name
>  #
>  ptxd_get_dl() {
> -    local dl
> +    local dl extra_cppflags extra_cflags
>      extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
>      extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
>  
> @@ -106,7 +106,7 @@ ptxd_split_lib_prefix_sysroot_eval() {
>      lib_dir="${lib_path%/${lib}}"		# abs path to that lib
>  
>      # try to identify sysroot part of that path
> -    for prefix in {/usr,}/lib{64,32,}{/tls,} ""; do
> +    for prefix in {/usr,}/lib{64,32,}{/tls,/gconv,/bin,} ""; do
>  	tmp="${lib_dir%${prefix}}"
>  	if test "${lib_dir}" != "${tmp}"; then
>  	    break
> @@ -241,10 +241,13 @@ ptxd_install_toolchain_lib() {
>  
>  
>  _ptxd_get_sysroot_usr_by_sysroot() {
> -    local sysroot
> +    local sysroot extra_cppflags extra_cflags
> +
> +    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> +    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
>  
>      sysroot="$(echo 'int main(void){return 0;}' | \
> -	${CC} -x c -o /dev/null -v - 2>&1 | \
> +	${CC} ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
>  	sed -ne "/.*collect2.*/s,.*--sysroot=\([^[:space:]]*\).*,\1,p")"
>  
>      test -n "${sysroot}" || return 1
> @@ -254,9 +257,12 @@ _ptxd_get_sysroot_usr_by_sysroot() {
>  
>  
>  _ptxd_get_sysroot_usr_by_progname() {
> -    local prog_name
> +    local prog_name extra_cppflags extra_cflags
> +
> +    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> +    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
>  
> -    prog_name="$(${CC} -print-prog-name=gcc)"
> +    prog_name="$(${CC} ${extra_cppflags} ${extra_cflags} -print-prog-name=gcc)"
>      case "${prog_name}" in
>  	/*)
>  	    prog_name="$(ptxd_abspath ${prog_name%/bin/gcc})"
> -- 
> 1.7.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings.
  2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
                   ` (7 preceding siblings ...)
  2012-03-19 21:14 ` [ptxdist] [PATCH 9/9 v2] [x86_64, multilib] Install Procps " Remy Bohmer
@ 2012-03-23  7:53 ` Michael Olbrich
  2012-03-24 18:29   ` Remy Bohmer
  8 siblings, 1 reply; 17+ messages in thread
From: Michael Olbrich @ 2012-03-23  7:53 UTC (permalink / raw)
  To: ptxdist

Hi,

I've seen the whole series, but I'm rather busy, and this requires a bit
more thinking. So it may take a while before we get everything in.

On Mon, Mar 19, 2012 at 10:14:44PM +0100, Remy Bohmer wrote:
> The ARCH_X86_64 architecture is added as subtype of ARCH_X86 since it
> basically is the same architecture, and a mix of both architectures
> will be required to allow multilib support in a later commit.
> 
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
>  v2: no changes since v1
> 
>  platforms/architecture.in |   15 +++++++++++++--
>  1 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/platforms/architecture.in b/platforms/architecture.in
> index ed36e8a..f00108e 100644
> --- a/platforms/architecture.in
> +++ b/platforms/architecture.in
> @@ -181,6 +181,16 @@ choice
>  
>  endchoice
>  
> +if ARCH_X86
> +#
> +# 32/64 bits platform
> +#
> +config ARCH_X86_64
> +	bool "64 bit architecture"
> +	help
> +	  Select this option if you build for a 64 bit architecture.
> +
> +endif

Have you considered adding ARCH_X86_32 as well (in a switch)? I think some
if our current "ifdef ARCH_X86" are really for 32bit only, so an option
would probably be useful.

Michael

>  
>  #
>  # endianess
> @@ -263,7 +273,7 @@ config HAS_MMU
>  config SIZEOF_LONG_DOUBLE
>  	string
>  	default "12" if ARCH_X86
> -#	default "16" if ARCH_X86_64
> +	default "16" if ARCH_X86_64
>  	default "8"
>  	# FIXME: add more values
>  
> @@ -277,7 +287,8 @@ config ARCH_STRING
>  	default "avr32"			if ARCH_AVR32
>  	default "alpha"			if ARCH_ALPHA
>  	default "blackfin"		if ARCH_BLACKFIN
> -	default "i386"			if ARCH_X86
> +	default "i386"			if ARCH_X86 && !ARCH_X86_64
> +	default "x86_64"		if ARCH_X86 && ARCH_X86_64
>  	default "i386"			if ARCH_MINGW
>  	default "m68k"			if ARCH_M68K
>  	default "ppc"			if ARCH_PPC
> -- 
> 1.7.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place
  2012-03-19 21:14 ` [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place Remy Bohmer
@ 2012-03-24 11:04   ` Michael Olbrich
  2012-03-24 11:06     ` Michael Olbrich
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Olbrich @ 2012-03-24 11:04 UTC (permalink / raw)
  To: ptxdist

On Mon, Mar 19, 2012 at 10:14:47PM +0100, Remy Bohmer wrote:
> While cross-compiling for x86_64 in a multilib configuration we need to
> install the libraries conform the Filesystem Hierarchy Standard (FHS).
> Summarised this will be for multilib:
> * All libraries compiled for and used in 64-bit applications need to be
>   installed in /lib64 or /usr/lib64.
> * All libraries compiled for and used in 32-bit applications need to be
>   installed in /lib or /usr/lib.
> * All executables will still find its way in the regular /bin and /sbin
>   paths.
> * The Operating System itself and all its libraries should only be compiled
>   in 64 bit mode. It should not be a mix between 32 and 64 bit libraries.
>   32 bit support will only contain the libraries that are required by
>   32-bit-applications to link against.
> 
> This is also conform what many distros derived from Redhat have in their
> setup. Note that Debian based distros follow a somewhat different setup.
> 
> Note that we use the compiler toolchain to tell us at which paths we
> need to install the libraries. This means that if you build for a x86_64
> target _without_ multilib support the libraries will likely end up in the
> classical /lib and /usr/lib directories, but that is completely steered
> by the compiler toolchain configuration. (it follows the location where
> the corresponding dynamic linker is expected to be installed)
> 
> So, this change makes ptxdist follow the sysroot of the compiler toolchain
> more such that preliminary multilib support can be achieved. Preliminary
> in the sense that only still one C-library is being installed.
> In another changeset the support for a 2nd C-library installation will be
> added. At least after this change (and a few subsequent ptxdist makefile
> fixes) the /lib and /usr/lib area will only contain the contents that belong
> there in multilib environment.
> 
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
>  v2: Fixed uClibc dynamic linker name resolving
>      Reworked review remarks from Michael Olbrich:
>      - Do not add fix paths to lib64, but get them from ptxd_get_lib_dir
>      - Call ptxd_get_lib_dir from the shell script in the make files
> 
>  rules/pre/Rules.make              |    4 +++-
>  scripts/lib/ptxd_make_00-init.sh  |   31 +++++++++++++++++++++++++++----
>  scripts/lib/ptxd_make_xpkg_pkg.sh |    7 +++++--
>  3 files changed, 35 insertions(+), 7 deletions(-)
> 
> diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
> index 1d6da52..018c815 100644
> --- a/rules/pre/Rules.make
> +++ b/rules/pre/Rules.make
> @@ -174,6 +174,8 @@ CROSS_ENV_PROGS := \
>  	$(CROSS_ENV_CPP_FOR_BUILD) \
>  	$(CROSS_ENV_LINK_FOR_BUILD)
>  
> +CROSS_LIB_DIR   := $(shell ptxd_get_lib_dir)
> +
>  #
>  # prepare to use pkg-config with wrapper which takes care of
>  # $(PTXDIST_SYSROOT_TARGET). The wrapper's magic doesn't work when
> @@ -266,7 +268,7 @@ CROSS_ENV := \
>  #
>  
>  CROSS_AUTOCONF_SYSROOT_USR := \
> -	--prefix=/usr --sysconfdir=/etc --localstatedir=/var
> +	--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/$(CROSS_LIB_DIR)
>  
>  CROSS_AUTOCONF_SYSROOT_ROOT := \
>  	--prefix=
> diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
> index da72d29..a13369c 100644
> --- a/scripts/lib/ptxd_make_00-init.sh
> +++ b/scripts/lib/ptxd_make_00-init.sh
> @@ -63,7 +63,10 @@ ptxd_init_arch() {
>  # out:	PTXDIST_SYSROOT_TOOLCHAIN
>  #
>  ptxd_init_sysroot_toolchain() {
> -    local compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
> +    local compiler_prefix extra_cppflags extra_cflags
> +    compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
> +    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> +    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
>  
>      #
>      # no compiler prefix specified means using plain "gcc"
> @@ -75,7 +78,7 @@ ptxd_init_sysroot_toolchain() {
>  	local sysroot
>  
>  	sysroot="$(echo 'int main(void){return 0;}' | \
> -	${compiler_prefix}gcc -x c -o /dev/null -v - 2>&1 | \
> +	${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \

I've pushed a change, that cleans up calling gcc here and in
install_copy_toolchain.sh. Please rebase.

Michael

>  	sed -ne "/.*collect2.*/s,.*--sysroot=\([^[:space:]]*\).*,\1,p" && \
>  	check_pipe_status)"
>  
> @@ -119,6 +122,23 @@ ptxd_init_collectionconfig() {
>  
>  
>  #
> +# out: 'lib' or 'lib64', derived from the ld-{linux,uClibc}.so.? from the compiler toolchain
> +#
> +ptxd_get_lib_dir() {
> +    local dl lib_dir extra_cppflags extra_cflags
> +    compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
> +    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> +    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
> +
> +    dl="$(echo 'int main(void){return 0;}' | \
> +	${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
> +	sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"
> +    lib_dir="${dl%%/ld-*.so.*}"
> +    echo "${lib_dir#/}"

this is /lib or /lib64 etc. right? The way you use it later, you should
remove the leading '/'. Otherwise you'll get /usr//lib, and while that is
valid as path, some scripts may not match it correctly.

Michael

> +}
> +export -f ptxd_get_lib_dir
> +
> +#
>  # setup compiler and pkgconfig environment
>  #
>  # in:
> @@ -140,6 +160,9 @@ ptxd_init_cross_env() {
>      prefix=( ${PTXDIST_PATH_SYSROOT_PREFIX} )
>      IFS="${orig_IFS}"
>  
> +    local -a lib_dir
> +    lib_dir=$(ptxd_get_lib_dir)
> +
>      # add "-isystem <DIR>/include"
>      local -a cppflags
>      cppflags=( "${prefix[@]/%//include}" )
> @@ -147,7 +170,7 @@ ptxd_init_cross_env() {
>  
>      # add "-L<DIR>/lib -Wl,-rpath-link -Wl,<DIR>"
>      local -a ldflags
> -    ldflags=( "${prefix[@]/%//lib}" )
> +    ldflags=( "${prefix[@]/%//${lib_dir}}" )
>      ldflags=( "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
>  
>      export \
> @@ -166,7 +189,7 @@ ptxd_init_cross_env() {
>  
>      # add <DIR>/lib/pkgconfig and <DIR>/share/pkgconfig
>      local -a pkg_libdir
> -    pkg_libdir=( "${prefix[@]/%//lib/pkgconfig}" "${prefix[@]/%//share/pkgconfig}" )
> +    pkg_libdir=( "${prefix[@]/%//${lib_dir}/pkgconfig}" "${prefix[@]/%//share/pkgconfig}" )
>  
>      #
>      # PKG_CONFIG_PATH contains additional pkg-config search
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index c03f19e..73ff2c2 100644
> --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> @@ -597,6 +597,8 @@ ptxd_install_spec() {
>  export -f ptxd_install_spec
>  
>  ptxd_install_package() {
> +    local lib_dir=$(ptxd_get_lib_dir)
> +
>      for dir in "${pkg_pkg_dir}/"{,usr/}{bin,sbin,libexec}; do
>  	find "${dir}" \( -type f -o -type l \) \
>  		    -perm /111 2>/dev/null | while read file; do
> @@ -605,7 +607,7 @@ ptxd_install_package() {
>  	done
>      done
>  
> -    for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
> +    for dir in "${pkg_pkg_dir}/"{,usr/}${lib_dir}; do
>  	find "${dir}" \( -type f -o -type l \) \
>  		    -a -name "*.so*" 2>/dev/null | while read file; do
>  	    ptxd_install_generic - "${file#${pkg_pkg_dir}}" ||
> @@ -635,10 +637,11 @@ ptxd_install_shared() {
>  export -f ptxd_install_shared
>  
>  ptxd_install_lib() {
> +    local lib_dir=$(ptxd_get_lib_dir)
>      local lib="$1"
>      shift
>  
> -    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
> +    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}${lib_dir}; do
>  	    find "${dir}" -type f -path "${dir}/${lib}.so*"; done 2>/dev/null)"
>  
>      if [ ! -f "${file}" ]; then
> -- 
> 1.7.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place
  2012-03-24 11:04   ` Michael Olbrich
@ 2012-03-24 11:06     ` Michael Olbrich
  0 siblings, 0 replies; 17+ messages in thread
From: Michael Olbrich @ 2012-03-24 11:06 UTC (permalink / raw)
  To: ptxdist

On Sat, Mar 24, 2012 at 12:04:13PM +0100, Michael Olbrich wrote:
> On Mon, Mar 19, 2012 at 10:14:47PM +0100, Remy Bohmer wrote:
> >  #
> > +# out: 'lib' or 'lib64', derived from the ld-{linux,uClibc}.so.? from the compiler toolchain
> > +#
> > +ptxd_get_lib_dir() {
> > +    local dl lib_dir extra_cppflags extra_cflags
> > +    compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)"
> > +    extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
> > +    extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
> > +
> > +    dl="$(echo 'int main(void){return 0;}' | \
> > +	${compiler_prefix}gcc ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
> > +	sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"
> > +    lib_dir="${dl%%/ld-*.so.*}"
> > +    echo "${lib_dir#/}"
> 
> this is /lib or /lib64 etc. right? The way you use it later, you should
> remove the leading '/'. Otherwise you'll get /usr//lib, and while that is
> valid as path, some scripts may not match it correctly.

Forget this. That's your last line. I forgot to copy it, when I played with
the code.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make
  2012-03-23  7:42   ` Michael Olbrich
@ 2012-03-24 18:24     ` Remy Bohmer
  2012-03-25 11:29       ` Michael Olbrich
  0 siblings, 1 reply; 17+ messages in thread
From: Remy Bohmer @ 2012-03-24 18:24 UTC (permalink / raw)
  To: ptxdist

Hi,

2012/3/23 Michael Olbrich <m.olbrich@pengutronix.de>:
> On Mon, Mar 19, 2012 at 10:14:46PM +0100, Remy Bohmer wrote:
>> These hardcoded paths do not work for a multilib environment where
>> libraries are typically installed in /lib64 for x86-64 instead of /lib
>> All correct paths can be found by interrogating the compiler toolchain
>> for the location of these files.
>
> Can't you use $(CROSS_LIB_DIR) here? I'd like to avoid larger changes to
> install_copy_toolchain.sh. This depends a lot on the toolchain and is
> rather difficult to test.

Are you sure you want this? Of course it can be done, but it feels
what somewhat redundant if we add an explicit path here.
After rebase on top of your gcc changes it is just a 1 line change.
Well, let's do the following: I first do the rebase, and see from
there how it looks. Adding CROSS_LIB_DIR can be done version 4 of the
patchset ;-)

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings.
  2012-03-23  7:53 ` [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Michael Olbrich
@ 2012-03-24 18:29   ` Remy Bohmer
  2012-03-26  8:50     ` Michael Olbrich
  0 siblings, 1 reply; 17+ messages in thread
From: Remy Bohmer @ 2012-03-24 18:29 UTC (permalink / raw)
  To: ptxdist

Hi,

2012/3/23 Michael Olbrich <m.olbrich@pengutronix.de>:
> Hi,
>
> I've seen the whole series, but I'm rather busy, and this requires a bit
> more thinking. So it may take a while before we get everything in.
>
> On Mon, Mar 19, 2012 at 10:14:44PM +0100, Remy Bohmer wrote:
>> The ARCH_X86_64 architecture is added as subtype of ARCH_X86 since it
>> basically is the same architecture, and a mix of both architectures
>> will be required to allow multilib support in a later commit.
>>
>> Signed-off-by: Remy Bohmer <linux@bohmer.net>
>> ---
>>  v2: no changes since v1
>>
>>  platforms/architecture.in |   15 +++++++++++++--
>>  1 files changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/platforms/architecture.in b/platforms/architecture.in
>> index ed36e8a..f00108e 100644
>> --- a/platforms/architecture.in
>> +++ b/platforms/architecture.in
>> @@ -181,6 +181,16 @@ choice
>>
>>  endchoice
>>
>> +if ARCH_X86
>> +#
>> +# 32/64 bits platform
>> +#
>> +config ARCH_X86_64
>> +     bool "64 bit architecture"
>> +     help
>> +       Select this option if you build for a 64 bit architecture.
>> +
>> +endif
>
> Have you considered adding ARCH_X86_32 as well (in a switch)? I think some
> if our current "ifdef ARCH_X86" are really for 32bit only, so an option
> would probably be useful.

I considered that but thought to look it like this: Assume the
platform is 32 bit, unless specified otherwise.
But maybe I have to look it at it more carefully. I drop it from the
series, and will repost this patch later. First, finalize the rest of
the series first.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make
  2012-03-24 18:24     ` Remy Bohmer
@ 2012-03-25 11:29       ` Michael Olbrich
  0 siblings, 0 replies; 17+ messages in thread
From: Michael Olbrich @ 2012-03-25 11:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

On Sat, Mar 24, 2012 at 07:24:30PM +0100, Remy Bohmer wrote:
> Hi,
> 
> 2012/3/23 Michael Olbrich <m.olbrich@pengutronix.de>:
> > On Mon, Mar 19, 2012 at 10:14:46PM +0100, Remy Bohmer wrote:
> >> These hardcoded paths do not work for a multilib environment where
> >> libraries are typically installed in /lib64 for x86-64 instead of /lib
> >> All correct paths can be found by interrogating the compiler toolchain
> >> for the location of these files.
> >
> > Can't you use $(CROSS_LIB_DIR) here? I'd like to avoid larger changes to
> > install_copy_toolchain.sh. This depends a lot on the toolchain and is
> > rather difficult to test.
> 
> Are you sure you want this? Of course it can be done, but it feels
> what somewhat redundant if we add an explicit path here.
> After rebase on top of your gcc changes it is just a 1 line change.
> Well, let's do the following: I first do the rebase, and see from
> there how it looks. Adding CROSS_LIB_DIR can be done version 4 of the
> patchset ;-)

Keep it as it is for now. I think the paths are extra hints to find the
libs. But this really depends on the toolchain. I don't know if this is
still necessary.
Marc: this is your code, can you comment on that?

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings.
  2012-03-24 18:29   ` Remy Bohmer
@ 2012-03-26  8:50     ` Michael Olbrich
  0 siblings, 0 replies; 17+ messages in thread
From: Michael Olbrich @ 2012-03-26  8:50 UTC (permalink / raw)
  To: ptxdist

On Sat, Mar 24, 2012 at 07:29:01PM +0100, Remy Bohmer wrote:
> 2012/3/23 Michael Olbrich <m.olbrich@pengutronix.de>:
> > I've seen the whole series, but I'm rather busy, and this requires a bit
> > more thinking. So it may take a while before we get everything in.
> >
> > On Mon, Mar 19, 2012 at 10:14:44PM +0100, Remy Bohmer wrote:
> >> The ARCH_X86_64 architecture is added as subtype of ARCH_X86 since it
> >> basically is the same architecture, and a mix of both architectures
> >> will be required to allow multilib support in a later commit.
> >>
> >> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> >> ---
> >>  v2: no changes since v1
> >>
> >>  platforms/architecture.in |   15 +++++++++++++--
> >>  1 files changed, 13 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/platforms/architecture.in b/platforms/architecture.in
> >> index ed36e8a..f00108e 100644
> >> --- a/platforms/architecture.in
> >> +++ b/platforms/architecture.in
> >> @@ -181,6 +181,16 @@ choice
> >>
> >>  endchoice
> >>
> >> +if ARCH_X86
> >> +#
> >> +# 32/64 bits platform
> >> +#
> >> +config ARCH_X86_64
> >> +     bool "64 bit architecture"
> >> +     help
> >> +       Select this option if you build for a 64 bit architecture.
> >> +
> >> +endif
> >
> > Have you considered adding ARCH_X86_32 as well (in a switch)? I think some
> > if our current "ifdef ARCH_X86" are really for 32bit only, so an option
> > would probably be useful.
> 
> I considered that but thought to look it like this: Assume the
> platform is 32 bit, unless specified otherwise.
> But maybe I have to look it at it more carefully. I drop it from the
> series, and will repost this patch later. First, finalize the rest of
> the series first.

You also need to do something with the "x86 optimization" choice. None of
the current choices support 64bit but there is hardware that could run with
either.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-03-26  8:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 21:14 [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Remy Bohmer
2012-03-19 21:14 ` [ptxdist] [PATCH 2/9 v2] [x86_64] libgcc need to be install in /lib64 instead of /lib Remy Bohmer
2012-03-19 21:14 ` [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make Remy Bohmer
2012-03-23  7:42   ` Michael Olbrich
2012-03-24 18:24     ` Remy Bohmer
2012-03-25 11:29       ` Michael Olbrich
2012-03-19 21:14 ` [ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place Remy Bohmer
2012-03-24 11:04   ` Michael Olbrich
2012-03-24 11:06     ` Michael Olbrich
2012-03-19 21:14 ` [ptxdist] [PATCH 5/9 v2] [x86_64, multilib] Install Zlib " Remy Bohmer
2012-03-19 21:14 ` [ptxdist] [PATCH 6/9 v2] [x86_64, multilib] Install Ncurses " Remy Bohmer
2012-03-19 21:14 ` [ptxdist] [PATCH 7/9 v2] [x86_64, multilib] Install Util-linux-ng " Remy Bohmer
2012-03-19 21:14 ` [ptxdist] [PATCH 8/9 v2] [x86_64, multilib] Install Readline " Remy Bohmer
2012-03-19 21:14 ` [ptxdist] [PATCH 9/9 v2] [x86_64, multilib] Install Procps " Remy Bohmer
2012-03-23  7:53 ` [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings Michael Olbrich
2012-03-24 18:29   ` Remy Bohmer
2012-03-26  8:50     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox