Re: [ptxdist] AT91SAM9263-ek

2012-06-28 Thread Remy Bohmer
Hi,

2012/6/28 Stutz Sven :
> Hello to everyone,
>
> I have an evaluation board (at91sam9263-ek Rev. B) from Atmel and I am
> trying now to get a customized OS running on this board.
>
> As I read in the manual, that I need for that purpose  a special BSP for
> this eval. board.
> But where can I get this BSP from or from which example BSP can I derive
> this information to built it from scratch?

FWIW: here you can find a ptxdist based start for the sam9x5 board
series. By changing some config options it might even work for the
at91sam9263ek.
http://www.at91.com/linux4sam/bin/view/Linux4SAM/VideoPlayerDemo
Note that it is based on an older kernel. I would go for 3.4 also, but
anything since at least 2.6.33 should run on this core. (and I even
ran older kernels since 2.6.21 on this SoC family ;-)

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 5/6 v5] [x86_64, multilib] Install Ncurses libraries at the right place

2012-03-28 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v5: No changes compared to v4

 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


[ptxdist] [PATCH 6/6 v5] [x86_64, multilib] Install Procps libraries at the right place

2012-03-28 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v5: No changes compared to v4

 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 
")
@$(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


[ptxdist] [PATCH 3/6 v5] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-28 Thread Remy Bohmer
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 
---
 v5: No changes compared to v4

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

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index 1d6da52..1d09a18 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,10 +268,10 @@ 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=
+   --libdir=/$(CROSS_LIB_DIR) --prefix=
 
 CROSS_AUTOCONF_ARCH := \
--host=$(PTXCONF_GNU_TARGET) \
diff --git a/rules/termcap.make b/rules/termcap.make
index 4222840..4cbcb5a 100644
--- a/rules/termcap.make
+++ b/rules/termcap.make
@@ -44,7 +44,8 @@ TERMCAP_ENV   := $(CROSS_ENV)
 # autoconf
 #
 TERMCAP_AUTOCONF := \
-   $(CROSS_AUTOCONF_ROOT) \
+   --prefix= \
+   $(CROSS_AUTOCONF_ARCH) \
--enable-install-termcap
 
 # 
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index eed2a2e..bd8f6a0 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -137,6 +137,19 @@ 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
+
+dl="$(ptxd_cross_cc_v | \
+   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:
@@ -158,6 +171,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 /include"
 local -a cppflags
 cppflags=( "${prefix[@]/%//include}" )
@@ -165,7 +181,7 @@ ptxd_init_cross_env() {
 
 # add "-L/lib -Wl,-rpath-link -Wl,"
 local -a ldflags
-ldflags=( "${prefix[@]/%//lib}" )
+ldflags=( "${prefix[@]/%//${lib_dir}}" )
 ldflags=( "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
 
 export \
@@ -184,7 +200,7 @@ ptxd_init_cross_env() {
 
 # add /lib/pkgconfig and /share/pkgconfig
 local -a pkg_libdir
-pkg_libdir=( "${prefix[@]/%//lib/pkgconfig}" 
"${prefix[@]/%//share/pkgconfig}" )
+pkg_libdir=( "${prefix[@]/%//${lib_dir}/pkgconfig}" 
"${prefix[

[ptxdist] [PATCH 4/6 v5] [x86_64, multilib] Install Zlib libraries at the right place

2012-03-28 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v5: No changes compared to v4

 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


[ptxdist] [PATCH 2/6 v5] [x86_64, multilib] Remove hardcoded paths from glibc.make

2012-03-28 Thread Remy Bohmer
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 
---
 v5:
   - dropped changes to installation of /bin/locale{,def}. Notice that
 this still works on x86_64 and multilib, since binaries are always
 installed in /bin,/usr/bin only libraries can be installed in
 different locations on multilib (/lib,/usr/lib,/lib64,/usr/lib64).
 So, I will not create a new patch to remove the /bin/locale hardcoded
 paths.
   - reverted changes to rules/post/install.make, notice that there is now
 an empty argument before the 'no-stripping' 'n'

 rules/glibc.make  |   19 +--
 scripts/install_copy_toolchain.sh |2 +-
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/rules/glibc.make b/rules/glibc.make
index 2de7a13..d2c5519 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -104,25 +104,24 @@ 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
diff --git a/scripts/install_copy_toolchain.sh 
b/scripts/install_copy_toolchain.sh
index 7b91fc4..0f21fce 100755
--- a/scripts/install_copy_toolchain.sh
+++ b/scripts/install_copy_toolchain.sh
@@ -101,7 +101,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,} ""; do
tmp="${lib_dir%${prefix}}"
if test "${lib_dir}" != "${tmp}"; then
break
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/6 v5] [x86_64, multilib] libgcc need to be install in /lib64 instead of /lib

2012-03-28 Thread Remy Bohmer
Let install_copy_toolchain itself figure out where to install the
libgcc libraries and its friends.

Signed-off-by: Remy Bohmer 
---
 v5: no changes compared to v4 (just to keep the series together)

 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


Re: [ptxdist] [PATCH v4 2/7] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-28 Thread Remy Bohmer
Hi,

2012/3/28 Michael Olbrich :
> On Sun, Mar 25, 2012 at 08:31:35PM +0200, 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.
>>
>> Signed-off-by: Remy Bohmer 
>> ---
>
> Please split the patch. I think the gconf stuff + change in
> scripts/install_copy_toolchain.sh is ready to be merged together with patch
> 1/7. We can merge bin/locale later when we have something.
>
> And leave rules/post/install.make as it is for now. We'll just not use the
> extra option for now.

OK, I will send an update of this patch.
Thanks

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v4 3/7] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-27 Thread Remy Bohmer
Hi,

2012/3/27 Michael Olbrich :
> I want to run some more tests, but this patch and the following patches
> look good now. I'll probably merge them right after the release.
> Not sure yet how I want to handle the first two patches...

I just build an OSELAS toolchain, and I noticed the following:
* gconf installation works as well with OSELAS toolchain
* libgcc installation works also
--> /bin/locale fails.

So, the first (libgcc) patch works with: OSELAS, CodeSourcery and
crosstool-ng toolchains.
The 2nd patch patch needs some rework on /bin/locale. I will see if I
can come up with a solution for this one as well.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v4 6/7] [x86_64, multilib] Install Readline libraries at the right place

2012-03-27 Thread Remy Bohmer
Hi,

2012/3/27 Michael Olbrich :
> On Sun, Mar 25, 2012 at 08:31:39PM +0200, Remy Bohmer wrote:
>> Signed-off-by: Remy Bohmer 
>> ---
>>  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)
>
> I think, this should be obsolete now, right?

Indeed, we added libdir now to CROSS_AUTOCONF_ROOT, so drop it.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 2/8 v3] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-27 Thread Remy Bohmer
Hi,

2012/3/27 Michael Olbrich :
> The code currently in master works with OSELAS.Toolchain and CodeSourcery
> toolchains. Your code does _not_ work with OSELAS.Toolchain. But if I
> understand you corrctly, it works with CodeSourcery toolchains?

Correct, it works with codesourcery toolchains and crosstool-ng toolchains.
I will look into the OSELAS issues.
Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 2/8 v3] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-26 Thread Remy Bohmer
Hi Michael,

2012/3/26 Michael Olbrich :
> On Sun, Mar 25, 2012 at 07:34:47PM +0200, Remy Bohmer wrote:
>> 2012/3/25 Michael Olbrich :
>> > On Sat, Mar 24, 2012 at 08:07:02PM +0100, Remy Bohmer wrote:
>> >>  ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
>> >> -     @$(call install_copy_toolchain_usr, glibc, bin/locale)
>> >> +     @$(call install_copy_toolchain_lib, glibc, bin/locale)
>> >>  endif
>> >
>> > This breaks with my toolchain:
>> > [...]
>> > install_copy_toolchain_lib: bin/locale not found
>> > [...]
>> >
>> > I guess, in your toolchain this is in lib[64]/bin because you need on for
>> > each.
>>
>> Correct, these are indeed for example in
>> /arm-none-linux-gnueabi/libc/usr/lib/bin/locale.
>> What toolchain are you using? So, I can reproduce it here and fix it.
>
> Any OSELAS.Toolchain[1] should do. The CodeSourcery toolchains should work
> as well, with the current code.
> Which toolchain are you using? This code should realy be cleaned up, if I
> ever find the time for it. I think it would be a good I idea to have
> multiple toolchains at hand for it.

I am not sure I understood you correctly. You mentioned that it breaks
with your toolchain... Does it work with OSELAS, or does it not?
We are using CodeSourcery toolchains for ia32 and ARM (several
different releases since 2009-2011), furthermore we are using
toolchains build with crosstool-ng. I tested with all of them, and
these compilers work.
I did NOT test with OSELAS toolchains (since the last time I checked
there was no Windows hosted equivalent for the application developers
besides the Linux hosted toolchains.)

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v4 7/7] [x86_64, multilib] Install Procps libraries at the right place

2012-03-25 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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 
")
@$(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


[ptxdist] [PATCH v4 5/7] [x86_64, multilib] Install Ncurses libraries at the right place

2012-03-25 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH v4 4/7] [x86_64, multilib] Install Zlib libraries at the right place

2012-03-25 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH v4 2/7] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-25 Thread Remy Bohmer
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 
---
 rules/glibc.make  |   23 +++
 rules/post/install.make   |   18 ++
 scripts/install_copy_toolchain.sh |2 +-
 3 files changed, 18 insertions(+), 25 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)";  

[ptxdist] [PATCH v4 6/7] [x86_64, multilib] Install Readline libraries at the right place

2012-03-25 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH v4 3/7] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-25 Thread Remy Bohmer
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 
---
 rules/pre/Rules.make  |6 --
 rules/termcap.make|3 ++-
 scripts/lib/ptxd_make_00-init.sh  |   20 ++--
 scripts/lib/ptxd_make_xpkg_pkg.sh |7 +--
 4 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index 1d6da52..1d09a18 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,10 +268,10 @@ 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=
+   --libdir=/$(CROSS_LIB_DIR) --prefix=
 
 CROSS_AUTOCONF_ARCH := \
--host=$(PTXCONF_GNU_TARGET) \
diff --git a/rules/termcap.make b/rules/termcap.make
index 4222840..4cbcb5a 100644
--- a/rules/termcap.make
+++ b/rules/termcap.make
@@ -44,7 +44,8 @@ TERMCAP_ENV   := $(CROSS_ENV)
 # autoconf
 #
 TERMCAP_AUTOCONF := \
-   $(CROSS_AUTOCONF_ROOT) \
+   --prefix= \
+   $(CROSS_AUTOCONF_ARCH) \
--enable-install-termcap
 
 # 
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index eed2a2e..bd8f6a0 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -137,6 +137,19 @@ 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
+
+dl="$(ptxd_cross_cc_v | \
+   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:
@@ -158,6 +171,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 /include"
 local -a cppflags
 cppflags=( "${prefix[@]/%//include}" )
@@ -165,7 +181,7 @@ ptxd_init_cross_env() {
 
 # add "-L/lib -Wl,-rpath-link -Wl,"
 local -a ldflags
-ldflags=( "${prefix[@]/%//lib}" )
+ldflags=( "${prefix[@]/%//${lib_dir}}" )
 ldflags=( "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
 
 export \
@@ -184,7 +200,7 @@ ptxd_init_cross_env() {
 
 # add /lib/pkgconfig and /share/pkgconfig
 local -a pkg_libdir
-pkg_libdir=( "${prefix[@]/%//lib/pkgconfig}" 
"${prefix[@]/%//share/pkgconfig}" )
+pkg_libdir=( "${prefix[@]/%//${lib_dir}/pkgconfig}" 
"${prefix[@]/%//share/pkgconfig}" )

[ptxdist] [PATCH v4 1/7] [x86_64] libgcc need to be install in /lib64 instead of /lib

2012-03-25 Thread Remy Bohmer
Let install_copy_toolchain itself figure out where to install the
libgcc libraries and its friends.

Signed-off-by: Remy Bohmer 
---
 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


Re: [ptxdist] [PATCH 3/8 v3] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-25 Thread Remy Bohmer
Hi,

> 2012/3/25 Remy Bohmer :
>> Hi,
>>
>> 2012/3/25 Michael Olbrich :
>>> On Sat, Mar 24, 2012 at 08:07:03PM +0100, Remy Bohmer wrote:
>>>>  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=
>>>
>>> Any reason why you didn't add --libdir=/$(CROSS_LIB_DIR) here?
>>
>> No special reason. I guess I forgot it, and did not see it go wrong 
>> anywhere...
>> I will update it in v4
>
> I added it and started a testbuild: Adding it will break termcap on
> unsupported configure option.
> Not sure how to solve it properly, any ideas? (patching termcap as well?)

Solved it by adapting termcap.make in v4.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/8 v3] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-25 Thread Remy Bohmer
Hi,

2012/3/25 Remy Bohmer :
> Hi,
>
> 2012/3/25 Michael Olbrich :
>> On Sat, Mar 24, 2012 at 08:07:03PM +0100, Remy Bohmer wrote:
>>>  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=
>>
>> Any reason why you didn't add --libdir=/$(CROSS_LIB_DIR) here?
>
> No special reason. I guess I forgot it, and did not see it go wrong 
> anywhere...
> I will update it in v4

I added it and started a testbuild: Adding it will break termcap on
unsupported configure option.
Not sure how to solve it properly, any ideas? (patching termcap as well?)

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 2/8 v3] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-25 Thread Remy Bohmer
Hi Michael,

2012/3/25 Michael Olbrich :
> On Sat, Mar 24, 2012 at 08:07:02PM +0100, Remy Bohmer wrote:
>>  ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
>> -     @$(call install_copy_toolchain_usr, glibc, bin/locale)
>> +     @$(call install_copy_toolchain_lib, glibc, bin/locale)
>>  endif
>
> This breaks with my toolchain:
> [...]
> install_copy_toolchain_lib: bin/locale not found
> [...]
>
> I guess, in your toolchain this is in lib[64]/bin because you need on for
> each.

Correct, these are indeed for example in
/arm-none-linux-gnueabi/libc/usr/lib/bin/locale.
What toolchain are you using? So, I can reproduce it here and fix it.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 6/8 v3] [x86_64, multilib] Install Util-linux-ng libraries at the right place

2012-03-25 Thread Remy Bohmer
Hi,

2012/3/25 Michael Olbrich :
> On Sat, Mar 24, 2012 at 08:07:06PM +0100, Remy Bohmer wrote:
>> 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.
>
> Does it break anything if we don't do this? I don't think anybody ever
> cared what ends up in / and what in /usr. I wouldn't mind installing these
> in /usr/lib.

I do not expect it would break anything, but I wanted to install the
libraries at the same place as before this patch series.
Goal was not to introduce any regression.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/8 v3] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-25 Thread Remy Bohmer
Hi,

2012/3/25 Michael Olbrich :
> On Sat, Mar 24, 2012 at 08:07:03PM +0100, Remy Bohmer wrote:
>>  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=
>
> Any reason why you didn't add --libdir=/$(CROSS_LIB_DIR) here?

No special reason. I guess I forgot it, and did not see it go wrong anywhere...
I will update it in v4

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 8/8 v3] [x86_64, multilib] Install Procps libraries at the right place

2012-03-24 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v2: no changes since v1
 v3: no changes since v2

 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 
")
@$(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


[ptxdist] [PATCH 5/8 v3] [x86_64, multilib] Install Ncurses libraries at the right place

2012-03-24 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v2: no changes since v1
 v3: no changes since v2

 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


[ptxdist] [PATCH 7/8 v3] [x86_64, multilib] Install Readline libraries at the right place

2012-03-24 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v2: no changes since v1
 v3: no changes since v2

 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


[ptxdist] [PATCH 6/8 v3] [x86_64, multilib] Install Util-linux-ng libraries at the right place

2012-03-24 Thread Remy Bohmer
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 
---
 v2: no changes since v1
 v3: no changes since v2

 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


[ptxdist] [PATCH 3/8 v3] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-24 Thread Remy Bohmer
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 
---
 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
 v3: trivial rebase of v2

 rules/pre/Rules.make  |4 +++-
 scripts/lib/ptxd_make_00-init.sh  |   20 ++--
 scripts/lib/ptxd_make_xpkg_pkg.sh |7 +--
 3 files changed, 26 insertions(+), 5 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 eed2a2e..bd8f6a0 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -137,6 +137,19 @@ 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
+
+dl="$(ptxd_cross_cc_v | \
+   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:
@@ -158,6 +171,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 /include"
 local -a cppflags
 cppflags=( "${prefix[@]/%//include}" )
@@ -165,7 +181,7 @@ ptxd_init_cross_env() {
 
 # add "-L/lib -Wl,-rpath-link -Wl,"
 local -a ldflags
-ldflags=( "${prefix[@]/%//lib}" )
+ldflags=( "${prefix[@]/%//${lib_dir}}" )
 ldflags=( "${ldflags[@]/#/-L}" "${ldflags[@]/#/-Wl,-rpath-link -Wl,}" )
 
 export \
@@ -184,7 +200,7 @@ ptxd_init_cross_env() {
 
 # add /lib/pkgconfig and /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() {
 expor

[ptxdist] [PATCH 4/8 v3] [x86_64, multilib] Install Zlib libraries at the right place

2012-03-24 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 v2: no changes since v1
 v3: no changes since v2

 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


[ptxdist] [PATCH 2/8 v3] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-24 Thread Remy Bohmer
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 
---
 v2: no changes since v1
 v3: rebase of v2 (dropped some changes since they are in mainline already)

 rules/glibc.make  |   23 +++
 rules/post/install.make   |   18 ++
 scripts/install_copy_toolchain.sh |2 +-
 3 files changed, 18 insertions(+), 25 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)";   

[ptxdist] [PATCH 1/8 v3] [x86_64] libgcc need to be install in /lib64 instead of /lib

2012-03-24 Thread Remy Bohmer
Let install_copy_toolchain itself figure out where to install the
libgcc libraries and its friends.

Signed-off-by: Remy Bohmer 
---
 v2: no changes since v1
 v3: trivial rebase of v2

 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


Re: [ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings.

2012-03-24 Thread Remy Bohmer
Hi,

2012/3/23 Michael Olbrich :
> 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 
>> ---
>>  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


Re: [ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-24 Thread Remy Bohmer
Hi,

2012/3/23 Michael Olbrich :
> 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


Re: [ptxdist] [PATCH 4/9] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-21 Thread Remy Bohmer
Hi Michael,

2012/3/20 Remy Bohmer :
> Hi,
>
> 2012/3/20 Michael Olbrich :
>>> >> -    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
>>> >> +    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib{,64}; do
>>> >
>>> > I don't like the explicit lib64 here. Next we'll get some debian like
>>> > multilib toolchain and it's lib/x86_64-linux-gnu oor so. Can't we get that
>>> > from ptxd_get_lib_dir?
>>>
>>> I think you are right and we can get it from ptxd_get_lib_dir, did not
>>> thought about that before. Good idea!
>>
>> export -f ptxd_get_lib_dir
>>
>> directly after the function.
>
> Was already part of my v2 patch ;-)
>

Just curious, did you already find some time to look at the complete changeset?

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] flashbench: Fix error when flashbench is not selected

2012-03-20 Thread Remy Bohmer
Hi,

2012/3/20 Bernhard Walle :
> When flashbench is not selected in "ptxdist menuconfig", then
> $(PTXCONF_FLASHBENCH_MAX_BUFSIZE) is undefined. In that case, the expr
> call fails.
>
> Fix the problem by delaying the evaluation of FLASHBENCH_MAKE_OPT until
> it's really needed, i.e. when flashbench has been selected.
>
> Signed-off-by: Bernhard Walle 
> ---
>  rules/flashbench.make |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..0ef52d1 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
>
>  FLASHBENCH_CONF_TOOL   := NO
>  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
>        EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* 
> $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))

Acked-by: Remy Bohmer 

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined

2012-03-20 Thread Remy Bohmer
Hi,

2012/3/20 Bernhard Walle :
> Sorry, I had the old (unpatched) flashbench.make in the rules directory
> of the project...
>
> Will send a patch that uses '=' instead of ':=' which is ready to be
> applied.

In that case I will drop my patch. Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined

2012-03-20 Thread Remy Bohmer
Hi,

2012/3/20 Juergen Beisert :
> Just delay the evaluation of the expression to the point of time when it is
> really required.
>
> diff --git a/rules/flashbench.make b/rules/flashbench.make
> index fcb669e..0ef52d1 100644
> --- a/rules/flashbench.make
> +++ b/rules/flashbench.make
> @@ -31,7 +31,7 @@ FLASHBENCH_LICENSE    := GPL v2
>
>  FLASHBENCH_CONF_TOOL   := NO
>  FLASHBENCH_MAKE_ENV    := $(CROSS_ENV)
> -FLASHBENCH_MAKE_OPT    := CC=$(CROSS_CC) \
> +FLASHBENCH_MAKE_OPT    = CC=$(CROSS_CC) \
>        EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* 
> $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))

This works fine here as well.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 4/9] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-20 Thread Remy Bohmer
Hi,

2012/3/20 Michael Olbrich :
>> >> -    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
>> >> +    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib{,64}; do
>> >
>> > I don't like the explicit lib64 here. Next we'll get some debian like
>> > multilib toolchain and it's lib/x86_64-linux-gnu oor so. Can't we get that
>> > from ptxd_get_lib_dir?
>>
>> I think you are right and we can get it from ptxd_get_lib_dir, did not
>> thought about that before. Good idea!
>
> export -f ptxd_get_lib_dir
>
> directly after the function.

Was already part of my v2 patch ;-)

Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 7/9 v2] [x86_64, multilib] Install Util-linux-ng libraries at the right place

2012-03-19 Thread Remy Bohmer
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 
---
 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


[ptxdist] [PATCH 8/9 v2] [x86_64, multilib] Install Readline libraries at the right place

2012-03-19 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 4/9 v2] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-19 Thread Remy Bohmer
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 
---
 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 "$

[ptxdist] [PATCH 5/9 v2] [x86_64, multilib] Install Zlib libraries at the right place

2012-03-19 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 3/9 v2] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-19 Thread Remy Bohmer
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 
---
 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)";

[ptxdist] [PATCH 9/9 v2] [x86_64, multilib] Install Procps libraries at the right place

2012-03-19 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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 
")
@$(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


[ptxdist] [PATCH 1/9 v2] [x86_64] Add x86_64 architecture strings.

2012-03-19 Thread Remy Bohmer
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 
---
 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


[ptxdist] [PATCH 2/9 v2] [x86_64] libgcc need to be install in /lib64 instead of /lib

2012-03-19 Thread Remy Bohmer
Let install_copy_toolchain itself figure out where to install the
libgcc libraries and its friends.

Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 6/9 v2] [x86_64, multilib] Install Ncurses libraries at the right place

2012-03-19 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH] [flashbench] Fix syntax error in case FLASHBENCH_MAX_BUFSIZE not defined

2012-03-19 Thread Remy Bohmer
This error occurs in case PTXCONF_FLASHBENCH_MAX_BUFSIZE is not defined:
$ ptxdist get
expr: syntax error
make: Nothing to be done for `get'.

Change-Id: I1978d62b8781dbd5090b8a47b8fd8b944e6c79dc
Signed-off-by: Remy Bohmer 
---
 rules/flashbench.make |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/rules/flashbench.make b/rules/flashbench.make
index fcb669e..b312979 100644
--- a/rules/flashbench.make
+++ b/rules/flashbench.make
@@ -31,8 +31,14 @@ FLASHBENCH_LICENSE   := GPL v2
 
 FLASHBENCH_CONF_TOOL   := NO
 FLASHBENCH_MAKE_ENV:= $(CROSS_ENV)
+
+ifdef PTXCONF_FLASHBENCH_MAX_BUFSIZE
+FLASHBENCH_MAX_BUFSIZE := $(PTXCONF_FLASHBENCH_MAX_BUFSIZE)
+else
+FLASHBENCH_MAX_BUFSIZE := 1
+endif
 FLASHBENCH_MAKE_OPT:= CC=$(CROSS_CC) \
-   EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* 
$(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
+   EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* 
$(FLASHBENCH_MAX_BUFSIZE))
 
 # 
 # Install
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 4/9] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-19 Thread Remy Bohmer
Hi,

2012/3/19 Michael Olbrich :
>> +# Outputs 'lib' or 'lib64', derived from the ld-linux.so.2 from the 
>> compiler toolchain
>> +CROSS_LIB_DIR        := $(shell   \
>> +     dl="$$(echo 'int main(void){return 0;}' | \
>> +     ${CROSS_CC} ${CROSS_CPPFLAGS} ${CROSS_CFLAGS} -x c -o /dev/null -v - 
>> 2>&1 | \
>> +     sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"; \
>> +     lib_dir="$${dl%%/ld-linux*}"; \
>> +     echo "$${lib_dir\#/}" \
>> +)
>
> This is the same as ptxd_get_lib_dir, right? This function should be
> defined here:

This is indeed the same function, but for some reason the
ptxd_get_lib_dir was not available.
I will look at it again.

>> -    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib; do
>> +    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}lib{,64}; do
>
> I don't like the explicit lib64 here. Next we'll get some debian like
> multilib toolchain and it's lib/x86_64-linux-gnu oor so. Can't we get that
> from ptxd_get_lib_dir?

I think you are right and we can get it from ptxd_get_lib_dir, did not
thought about that before. Good idea!

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 4/9] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-19 Thread Remy Bohmer
Hi,

> diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
> index 1d6da52..d6d40e0 100644
> --- a/rules/pre/Rules.make
> +++ b/rules/pre/Rules.make
> @@ -174,6 +174,15 @@ CROSS_ENV_PROGS := \
>        $(CROSS_ENV_CPP_FOR_BUILD) \
>        $(CROSS_ENV_LINK_FOR_BUILD)
>
> +# Outputs 'lib' or 'lib64', derived from the ld-linux.so.2 from the compiler 
> toolchain
> +CROSS_LIB_DIR  := $(shell   \
> +       dl="$$(echo 'int main(void){return 0;}' | \
> +       ${CROSS_CC} ${CROSS_CPPFLAGS} ${CROSS_CFLAGS} -x c -o /dev/null -v - 
> 2>&1 | \
> +       sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"; \
> +       lib_dir="$${dl%%/ld-linux*}"; \

This does not work uClibc based toolchains, there the linker is called
ld-uClibc.so.0. I will post an update of the series.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 6/9] [x86_64, multilib] Install Ncurses libraries at the right place

2012-03-18 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 7/9] [x86_64, multilib] Install Util-linux-ng libraries at the right place

2012-03-18 Thread Remy Bohmer
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 
---
 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


[ptxdist] [PATCH 5/9] [x86_64, multilib] Install Zlib libraries at the right place

2012-03-18 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 3/9] [x86_64, multilib] Remove all hardcoded paths from glibc.make

2012-03-18 Thread Remy Bohmer
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 
---
 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)";   

[ptxdist] [PATCH 1/9] [x86_64] Add x86_64 architecture strings.

2012-03-18 Thread Remy Bohmer
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 
---
 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


[ptxdist] [PATCH 9/9] [x86_64, multilib] Install Procps libraries at the right place

2012-03-18 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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 
")
@$(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


[ptxdist] [PATCH 8/9] [x86_64, multilib] Install Readline libraries at the right place

2012-03-18 Thread Remy Bohmer
Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 2/9] [x86_64] libgcc need to be install in /lib64 instead of /lib

2012-03-18 Thread Remy Bohmer
Let install_copy_toolchain itself figure out where to install the
libgcc libraries and its friends.

Signed-off-by: Remy Bohmer 
---
 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


[ptxdist] [PATCH 4/9] [x86_64, multilib] Make packages install their libraries at the right place

2012-03-18 Thread Remy Bohmer
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 
---
 rules/pre/Rules.make  |   11 ++-
 scripts/lib/ptxd_make_00-init.sh  |   30 ++
 scripts/lib/ptxd_make_xpkg_pkg.sh |4 ++--
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index 1d6da52..d6d40e0 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -174,6 +174,15 @@ CROSS_ENV_PROGS := \
$(CROSS_ENV_CPP_FOR_BUILD) \
$(CROSS_ENV_LINK_FOR_BUILD)
 
+# Outputs 'lib' or 'lib64', derived from the ld-linux.so.2 from the compiler 
toolchain
+CROSS_LIB_DIR  := $(shell   \
+   dl="$$(echo 'int main(void){return 0;}' | \
+   ${CROSS_CC} ${CROSS_CPPFLAGS} ${CROSS_CFLAGS} -x c -o /dev/null -v - 
2>&1 | \
+   sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"; \
+   lib_dir="$${dl%%/ld-linux*}"; \
+   echo "$${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 +275,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..d08cb92 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,22 @@ ptxd_init_collectionconfig() {
 
 
 #
+# out: 'lib' or 'lib64', derived from the ld-linux.so.2 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

[ptxdist] [PATCH 0/9] Add preliminary multilib support for x86_64

2012-03-18 Thread Remy Bohmer
This complete series makes it possible to use a multilib based compiler
toolchain for x86_64 to deliver a filesystem properly configured to be
used in multilib environments. Notice that currently still only 1 C-library
is being installed in the target root filesystem. A 2nd C-library
configuration will be added in future changesets.

Regression tests have been executed to make sure the series does not break
existing use of single lib toolchains.

It has been tested with a Sourcery Codebench lite toolchain.
These can be found here:
https://sourcery.mentor.com/sgpp/lite/ia32/portal/subscription10027lite=IA32
System boots properly and all runtime linking appears to work as expected.
If you want to build a filesystem with this toolchain you need to set
the following items in your platformconfig (or read the toolchain manuals):
* PTXCONF_TARGET_EXTRA_CPPFLAGS="-march=core2 -m64"
* PTXCONF_TARGET_EXTRA_CFLAGS="-march=core2 -m64"
* PTXCONF_TARGET_EXTRA_CXXFLAGS="-march=core2 -m64"
* PTXCONF_TARGET_EXTRA_LDFLAGS="-march=core2 -m64"
>From here you can run ptxdist as usual.

Remy Bohmer (9):
  [x86_64] Add x86_64 architecture strings.
  [x86_64] libgcc need to be install in /lib64 instead of /lib
  [x86_64,multilib] Remove all hardcoded paths from glibc.make
  [x86_64,multilib] Make packages install their libraries at the right place
  [x86_64,multilib] Install Zlib libraries at the right place
  [x86_64,multilib] Install Ncurses libraries at the right place
  [x86_64,multilib] Install Util-linux-ng libraries at the right place
  [x86_64,multilib] Install Readline libraries at the right place
  [x86_64,multilib] Install Procps libraries at the right place

 platforms/architecture.in |   15 +--
 rules/gcclibs.make|6 +++---
 rules/glibc.make  |   23 +++
 rules/ncurses.make|   30 +++---
 rules/post/install.make   |   18 ++
 rules/pre/Rules.make  |   11 ++-
 rules/procps.make |5 ++---
 rules/readline.make   |3 ++-
 rules/util-linux-ng.make  |1 +
 rules/zlib.make   |3 ++-
 scripts/install_copy_toolchain.sh |   20 +---
 scripts/lib/ptxd_make_00-init.sh  |   30 ++
 scripts/lib/ptxd_make_xpkg_pkg.sh |4 ++--
 13 files changed, 106 insertions(+), 63 deletions(-)

-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 1/5 v2] [rt-tests] Use CFLAGS specified by ptxdist platformconfig

2012-03-15 Thread Remy Bohmer
Hi,

2012/3/15 Michael Olbrich :
> On Tue, Mar 13, 2012 at 10:32:14PM +0100, Remy Bohmer wrote:
>> The platformconfig can specify some valuable global flags for each
>> package in the configuration to build, for example:
>> * CPU optimisations (-march= and friends)
>> * multilib toolchain selection between x86_64 and ia32 such as used for
>>  the Sourcery Codebench compiler toolchains as specified here:
>>  https://sourcery.mentor.com/sgpp/lite/ia32/portal/doc12648/getting-started.pdf
>>  (chapter 3.2 Library configurations)
>>
>> Signed-off-by: Remy Bohmer 
>> ---
>>  v2: Reworked review comments from Michael Olbrich
>
> I think the whole series is now applied. Please verify that I didn't miss
> anything.

I have seen the entire series in the git tree already.
Looks good. Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/5 v4] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-14 Thread Remy Bohmer
Busybox make is not properly called in case:
* compiler name tuple does not match target tuple (as used in multilib
 compilers, for example: i686-pc-linux-gnu-gcc can compile for
 x86_64-unknown-linux-gnu targets. To solve this the 'SUBARCH' need to be
 set)
* CONFIG_EXTRA_CFLAGS need to e set to select the proper sysroot to
 compile against in busybox
* LDFLAGS to link against the proper sysroot.

Signed-off-by: Remy Bohmer 
---
 v2: Reworked review comments from Michael Olbrich
 v3: Convert spaces->tabs + Added '\' after CFLAGS line
 checked after build if build-target/busybox/busybox remains unstripped.
 v4: My authors email-address was wrong

 rules/busybox.make |   13 -
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/rules/busybox.make b/rules/busybox.make
index 536aa80..54b5367 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -49,14 +49,17 @@ $(STATEDIR)/busybox.prepare:
 
 BUSYBOX_MAKE_OPT := \
ARCH=$(PTXCONF_ARCH_STRING) \
+   SUBARCH=$(PTXCONF_ARCH_STRING) \
CROSS_COMPILE=$(COMPILER_PREFIX) \
-   CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \
-   HOSTCC=$(HOSTCC) \
+   HOSTCC=$(HOSTCC)
+
+BUSYBOX_MAKE_ENV := \
+   $(CROSS_ENV) \
+   CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)" \
SKIP_STRIP=y
 
-ifdef PTXCONF_BUSYBOX_RFKILL
-BUSYBOX_MAKE_OPT += CFLAGS="-I$(KERNEL_HEADERS_INCLUDE_DIR)"
-endif
+BUSYBOX_INSTAL_ENV := \
+   $(BUSYBOX_MAKE_ENV)
 
 BUSYBOX_INSTALL_OPT := \
$(BUSYBOX_MAKE_OPT) \
-- 
1.7.0.4



-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/5 v3] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-14 Thread Remy Bohmer
From: Remy Bohmer 

Busybox make is not properly called in case:
* compiler name tuple does not match target tuple (as used in multilib
 compilers, for example: i686-pc-linux-gnu-gcc can compile for
 x86_64-unknown-linux-gnu targets. To solve this the 'SUBARCH' need to be
 set)
* CONFIG_EXTRA_CFLAGS need to e set to select the proper sysroot to
 compile against in busybox
* LDFLAGS to link against the proper sysroot.

Signed-off-by: Remy Bohmer 
---
 v2: Reworked review comments from Michael Olbrich
 v3: Convert spaces->tabs + Added '\' after CFLAGS line
 checked after build if build-target/busybox/busybox remains unstripped.

 rules/busybox.make |   13 -
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/rules/busybox.make b/rules/busybox.make
index 536aa80..54b5367 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -49,14 +49,17 @@ $(STATEDIR)/busybox.prepare:
 
 BUSYBOX_MAKE_OPT := \
ARCH=$(PTXCONF_ARCH_STRING) \
+   SUBARCH=$(PTXCONF_ARCH_STRING) \
CROSS_COMPILE=$(COMPILER_PREFIX) \
-   CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \
-   HOSTCC=$(HOSTCC) \
+   HOSTCC=$(HOSTCC)
+
+BUSYBOX_MAKE_ENV := \
+   $(CROSS_ENV) \
+   CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)" \
SKIP_STRIP=y
 
-ifdef PTXCONF_BUSYBOX_RFKILL
-BUSYBOX_MAKE_OPT += CFLAGS="-I$(KERNEL_HEADERS_INCLUDE_DIR)"
-endif
+BUSYBOX_INSTAL_ENV := \
+   $(BUSYBOX_MAKE_ENV)
 
 BUSYBOX_INSTALL_OPT := \
$(BUSYBOX_MAKE_OPT) \
-- 
1.7.0.4



-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/5 v2] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-14 Thread Remy Bohmer
Hi,

2012/3/14 Michael Olbrich :
>>
>> Indent with on  everywhere.

OK

>> > +
>> > +BUSYBOX_MAKE_ENV := \
>> > +       $(CROSS_ENV) \
>> > +       CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)"
>> > +       SKIP_STRIP=y
>>
>> Looks like SKIP_STRIP=y must be in BUSYBOX_MAKE_OPT, or it's not used.
>
> No wait, you're just missing '\' at the end of the previous line.

Fun :-)
I just copied your proposal and tested if it did what it needed to do...

I will fix it and repost a new patch version.

Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 5/5 v2] [x86_64, glibc] Link /usr/lib/libdl.so is not needed and wrong on x86_64

2012-03-13 Thread Remy Bohmer
This link is always being generated and it is assumed that it must
always point to /lib/libdl.so.2.
But this script is not needed and points to the wrong location when a
multilib toolchain is being used where the dynamic linker must be in
/lib64

Signed-off-by: Remy Bohmer 
---
 v2: Repost to keep the series together

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

diff --git a/rules/glibc.make b/rules/glibc.make
index 3ddf249..2de7a13 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -57,7 +57,6 @@ endif
 
 ifdef PTXCONF_GLIBC_DL
@$(call install_copy_toolchain_lib, glibc, libdl.so.2)
-   @$(call install_link, glibc, ../../lib/libdl.so.2, /usr/lib/libdl.so)
 endif
 
 ifdef PTXCONF_GLIBC_CRYPT
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 4/5 v2] [x86_64, glibc] on multilib do not put all dynamic linkers in /lib

2012-03-13 Thread Remy Bohmer
It is assumed by the makefiles that all dynamic linkers must be put in
/lib. This is however not true. Especially on multilib configurations this
information cannot be guessed. By looking in the sysroot of the compiler
toolchain the right paths can be found. Default the scripts already look
there, so remove the unneeded options.

Signed-off-by: Remy Bohmer 
---
 v2: repost to keep the series together

 rules/glibc.make|2 +-
 rules/post/install.make |9 +++--
 rules/uclibc.make   |2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/rules/glibc.make b/rules/glibc.make
index c4e6724..3ddf249 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -36,7 +36,7 @@ $(STATEDIR)/glibc.targetinstall:
@$(call install_fixup, glibc,DESCRIPTION,missing)
 
 ifdef PTXCONF_GLIBC_LD
-   @$(call install_copy_toolchain_dl, glibc, /lib)
+   @$(call install_copy_toolchain_dl, glibc)
 endif
 
 ifdef PTXCONF_GLIBC_C
diff --git a/rules/post/install.make b/rules/post/install.make
index 4ad7f87..190ec28 100644
--- a/rules/post/install.make
+++ b/rules/post/install.make
@@ -317,17 +317,14 @@ install_copy_toolchain_lib =  
\
 # install_copy_toolchain_dl
 #
 # $1: xpkg label
-# $2: destination
-# $3: strip (y|n)  default is to strip
+# $2: strip (y|n)  default is to strip
 #
 install_copy_toolchain_dl =
\
XPKG=$(subst _,-,$(strip $(1)));
\
-   DST="$(strip $2)";  
\
-   STRIP="$(strip $3)";
\
-   test "$${DST}" != "" && DST="-d $${DST}";   
\
+   STRIP="$(strip $2)";
\
$(call install_check, install_copy_toolchain_dl);   
\
${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)"   
\
-   $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l LINKER 
$${DST} -s "$${STRIP}"
+   $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l LINKER 
-s "$${STRIP}"
 
 #
 # install_copy_toolchain_other
diff --git a/rules/uclibc.make b/rules/uclibc.make
index 22583fd..c6cc86f 100644
--- a/rules/uclibc.make
+++ b/rules/uclibc.make
@@ -30,7 +30,7 @@ $(STATEDIR)/uclibc.targetinstall:
@$(call install_fixup, uclibc,DESCRIPTION,missing)
 
 ifdef PTXCONF_UCLIBC
-   @$(call install_copy_toolchain_dl, uclibc, /lib)
+   @$(call install_copy_toolchain_dl, uclibc)
 endif
 
 ifdef PTXCONF_UCLIBC_C
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/5 v2] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-13 Thread Remy Bohmer
Busybox make is not properly called in case:
* compiler name tuple does not match target tuple (as used in multilib
 compilers, for example: i686-pc-linux-gnu-gcc can compile for
 x86_64-unknown-linux-gnu targets. To solve this the 'SUBARCH' need to be
 set)
* CONFIG_EXTRA_CFLAGS need to e set to select the proper sysroot to
 compile against in busybox
* LDFLAGS to link against the proper sysroot.

Signed-off-by: Remy Bohmer 
---
 v2: Reworked review comments from Michael Olbrich

 rules/busybox.make |   21 -
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/rules/busybox.make b/rules/busybox.make
index 536aa80..45fd20f 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -48,15 +48,18 @@ $(STATEDIR)/busybox.prepare:
@$(call touch)
 
 BUSYBOX_MAKE_OPT := \
-   ARCH=$(PTXCONF_ARCH_STRING) \
-   CROSS_COMPILE=$(COMPILER_PREFIX) \
-   CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \
-   HOSTCC=$(HOSTCC) \
-   SKIP_STRIP=y
-
-ifdef PTXCONF_BUSYBOX_RFKILL
-BUSYBOX_MAKE_OPT += CFLAGS="-I$(KERNEL_HEADERS_INCLUDE_DIR)"
-endif
+   ARCH=$(PTXCONF_ARCH_STRING) \
+   SUBARCH=$(PTXCONF_ARCH_STRING) \
+   CROSS_COMPILE=$(COMPILER_PREFIX) \
+   HOSTCC=$(HOSTCC)
+
+BUSYBOX_MAKE_ENV := \
+   $(CROSS_ENV) \
+   CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)"
+   SKIP_STRIP=y
+
+BUSYBOX_INSTAL_ENV := \
+   $(BUSYBOX_MAKE_ENV)
 
 BUSYBOX_INSTALL_OPT := \
$(BUSYBOX_MAKE_OPT) \
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/5 v2] [x86_64] Add some support for multilib detection in the toolchain

2012-03-13 Thread Remy Bohmer
For Sourcery Codebench toolchains the 'gcc -print-file-name' only returns
the proper sysroot directory when the proper architecture flags are
provided via '-m64 -march=' flags. These flags are provided via the
ptxdist platformconfig PTXCONF_TARGET_EXTRA_CFLAGS setting.
These flags therefore also need to be passed to GCC here.

Signed-off-by: Remy Bohmer 
---
 v2: Reworked review comments from Michael Olbrich

 scripts/install_copy_toolchain.sh |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/scripts/install_copy_toolchain.sh 
b/scripts/install_copy_toolchain.sh
index 8a67698..726cc61 100755
--- a/scripts/install_copy_toolchain.sh
+++ b/scripts/install_copy_toolchain.sh
@@ -50,12 +50,14 @@ ptxd_abs2rel() {
 # out: $lib_path
 #
 ptxd_get_lib_path() {
-local lib lib_dir lib_path
+local lib lib_dir lib_path extra_cflags
 
 lib="${1}"
+extra_cppflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CPPFLAGS)"
+extra_cflags="$(ptxd_get_ptxconf PTXCONF_TARGET_EXTRA_CFLAGS)"
 
 # ask the compiler for the lib
-lib_path="$(${CC} -print-file-name=${lib})"
+lib_path="$(${CC} ${extra_cppflags} ${extra_cflags} 
-print-file-name=${lib})"
 if test "${lib_path}" = "${lib}"; then
echo "install_copy_toolchain_lib: ${lib} not found" >&2
return 1
@@ -77,9 +79,11 @@ ptxd_get_lib_path() {
 #
 ptxd_get_dl() {
 local dl
+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;}' | \
-   ${CC} -x c -o /dev/null -v - 2>&1 | \
+   ${CC} ${extra_cppflags} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"
 
 echo "${dl##*/}"
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/5 v2] [rt-tests] Use CFLAGS specified by ptxdist platformconfig

2012-03-13 Thread Remy Bohmer
The platformconfig can specify some valuable global flags for each
package in the configuration to build, for example:
* CPU optimisations (-march= and friends)
* multilib toolchain selection between x86_64 and ia32 such as used for
 the Sourcery Codebench compiler toolchains as specified here:
 https://sourcery.mentor.com/sgpp/lite/ia32/portal/doc12648/getting-started.pdf
 (chapter 3.2 Library configurations)

Signed-off-by: Remy Bohmer 
---
 v2: Reworked review comments from Michael Olbrich

 patches/rt-tests-0.73/add-extra-cflags.patch |   32 ++
 patches/rt-tests-0.73/series |1 +
 rules/rt-tests.make  |1 +
 3 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 patches/rt-tests-0.73/add-extra-cflags.patch

diff --git a/patches/rt-tests-0.73/add-extra-cflags.patch 
b/patches/rt-tests-0.73/add-extra-cflags.patch
new file mode 100644
index 000..fc869c6
--- /dev/null
+++ b/patches/rt-tests-0.73/add-extra-cflags.patch
@@ -0,0 +1,32 @@
+CFLAGS are specified in environment as well
+
+If the environment already has specified CFLAGS we shall
+not overwrite them
+
+Signed-off-by: Remy Bohmer 
+---
+ Makefile |4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: rt-tests-0.73/Makefile
+===
+--- rt-tests-0.73.orig/Makefile
 rt-tests-0.73/Makefile
+@@ -6,7 +6,7 @@ sources = cyclictest.c signaltest.c pi_s
+ 
+ TARGETS = $(sources:.c=)
+ 
+-LIBS  = -lrt -lpthread
++LIBS  = $(LDFLAGS) -lrt -lpthread
+ EXTRA_LIBS ?= -ldl# for get_cpu
+ DESTDIR   ?=
+ prefix  ?= /usr/local
+@@ -14,7 +14,7 @@ bindir  ?= $(prefix)/bin
+ mandir?= $(prefix)/share/man
+ srcdir?= $(prefix)/src
+ 
+-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
++CFLAGS := $(CPPFLAGS) -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include $(CFLAGS)
+ 
+ PYLIB  := $(shell python -c 'import distutils.sysconfig;  print 
distutils.sysconfig.get_python_lib()')
+ 
diff --git a/patches/rt-tests-0.73/series b/patches/rt-tests-0.73/series
index 74fbce0..caf1a74 100644
--- a/patches/rt-tests-0.73/series
+++ b/patches/rt-tests-0.73/series
@@ -1 +1,2 @@
 fix_3_0_issue.diff
+add-extra-cflags.patch
diff --git a/rules/rt-tests.make b/rules/rt-tests.make
index 3bc6568..1880beb 100644
--- a/rules/rt-tests.make
+++ b/rules/rt-tests.make
@@ -34,6 +34,7 @@ RT_TESTS_DIR  := $(BUILDDIR)/$(RT_TESTS)
 
 RT_TESTS_CONF_TOOL := NO
 RT_TESTS_MAKE_OPT  := $(CROSS_ENV_CC) prefix=/usr
+RT_TESTS_MAKE_ENV  := $(CROSS_ENV_FLAGS)
 RT_TESTS_INSTALL_OPT   := $(RT_TESTS_MAKE_OPT) install
 
 # 
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-13 Thread Remy Bohmer
Hi,

2012/3/13 Michael Olbrich :
> On Tue, Mar 13, 2012 at 01:46:26PM +0100, Remy Bohmer wrote:
>> It seems I have to stick with the bare minimal options I can set
>> here... Or any other ideas?
>
> Don't set any flags in BUSYBOX_MAKE_OPT. From what I can tell, the current
> busybox Makefile uses CFLAGS, CPPFLAGS and LDFLAGS from the environment.
> Try something like this (untested):
>
> BUSYBOX_MAKE_OPT := \
>        ARCH=$(PTXCONF_ARCH_STRING) \
>        SUBARCH=$(PTXCONF_ARCH_STRING) \
>        CROSS_COMPILE=$(COMPILER_PREFIX) \
>        HOSTCC=$(HOSTCC)
>
> BUSYBOX_MAKE_ENV := \
>        $(CROSS_ENV) \
>        CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)"
>        SKIP_STRIP=y
>
> BUSYBOX_INSTAL_ENV := \
>        $(BUSYBOX_MAKE_ENV)
>
>
> and remove the PTXCONF_BUSYBOX_RFKILL stuff. The extra "-I" unconditionally
> does not hurt.

This seems to work properly. Thanks.
Will repost a new series in a minute.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-13 Thread Remy Bohmer
Hi,

2012/3/13 Michael Olbrich :
> On Mon, Mar 12, 2012 at 10:25:02PM +0100, Remy Bohmer wrote:
>> Busybox make is not properly called in case:
>> * compiler name tuple does not match target tuple (as used in multilib
>>   compilers, for example: i686-pc-linux-gnu-gcc can compile for
>>   x86_64-unknown-linux-gnu targets. To solve this the 'SUBARCH' need to be
>>   set)
>> * CONFIG_EXTRA_CFLAGS need to e set to select the proper sysroot to
>>   compile against in busybox
>> * LDFLAGS to link against the proper sysroot.
>>
>> Signed-off-by: Remy Bohmer 
>> ---
>>  rules/busybox.make |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/rules/busybox.make b/rules/busybox.make
>> index 536aa80..42cb81c 100644
>> --- a/rules/busybox.make
>> +++ b/rules/busybox.make
>> @@ -49,9 +49,12 @@ $(STATEDIR)/busybox.prepare:
>>
>>  BUSYBOX_MAKE_OPT := \
>>       ARCH=$(PTXCONF_ARCH_STRING) \
>> +     SUBARCH=$(PTXCONF_ARCH_STRING) \
>>       CROSS_COMPILE=$(COMPILER_PREFIX) \
>>       CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \
>>       HOSTCC=$(HOSTCC) \
>> +     CONFIG_EXTRA_CFLAGS="$(PTXCONF_TARGET_EXTRA_CFLAGS)" \
>> +     LDFLAGS="$(PTXCONF_TARGET_EXTRA_LDFLAGS)" \
>
>        CONFIG_EXTRA_CFLAGS="$(CROSS_CPPFLAGS) $(CROSS_CFLAGS)" \
>        $(CROSS_ENV_LDFLAGS) \

This results in:
---
target: busybox.prepare
---

make: invalid option -- '6'
make: invalid option -- '4'
make: invalid option -- '/'
make: invalid option -- '/'
Usage: make [options] [target] ...
Options:
etc.

It seems I have to stick with the bare minimal options I can set
here... Or any other ideas?

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 4/5] [x86_64, libc] on multilib do not put all dynamic linkers in /lib

2012-03-13 Thread Remy Bohmer
Hi,

FYI: With these 5 patches (and a few unfinished architecture.in
patches I have here locally) I at least get the glibc and the dynamic
linkers installed in the right place and all binaries we used to be
compiled with the right flags.
Furthermore, I noticed that the extra flags are not passed properly to
all packages, so I expect to find more issues with multilib on X86.
So, since we need the multilib/x86_64 support I expect that in time
more patches will likely be posted to get this supported in ptxdist.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 4/5] [x86_64, libc] on multilib do not put all dynamic linkers in /lib

2012-03-13 Thread Remy Bohmer
Hi,

2012/3/13 Michael Olbrich :
> On Mon, Mar 12, 2012 at 10:25:03PM +0100, Remy Bohmer wrote:
>> It is assumed by the makefiles that all dynamic linkers must be put in
>> /lib. This is however not true. Especially on multilib configurations this
>> information cannot be guessed. By looking in the sysroot of the compiler
>> toolchain the right paths can be found. Default the scripts already look
>> there, so remove the unneeded options.
>
> No obvious issues but I need to do some more testing, to make sure it
> doesn't break any other toolchains.

OK. Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-13 Thread Remy Bohmer
Hi,

2012/3/13 Michael Olbrich :
> On Mon, Mar 12, 2012 at 10:25:02PM +0100, Remy Bohmer wrote:
>>  BUSYBOX_MAKE_OPT := \
>>       ARCH=$(PTXCONF_ARCH_STRING) \
>> +     SUBARCH=$(PTXCONF_ARCH_STRING) \
>>       CROSS_COMPILE=$(COMPILER_PREFIX) \
>>       CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \
>>       HOSTCC=$(HOSTCC) \
>> +     CONFIG_EXTRA_CFLAGS="$(PTXCONF_TARGET_EXTRA_CFLAGS)" \
>> +     LDFLAGS="$(PTXCONF_TARGET_EXTRA_LDFLAGS)" \
>
>        CONFIG_EXTRA_CFLAGS="$(CROSS_CPPFLAGS) $(CROSS_CFLAGS)" \
>        $(CROSS_ENV_LDFLAGS) \

IIRC I tried this and that the build started failing if I added all flags.
Will look into it again.

Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 2/5] [x86_64] Add some support for multilib detection in the toolchain

2012-03-13 Thread Remy Bohmer
Hi,

2012/3/13 Michael Olbrich :
>>
>>      lib="${1}"
>> +    extra_cflags=$(source ${PTXDIST_PLATFORMCONFIG} && echo 
>> "${PTXCONF_TARGET_EXTRA_CFLAGS}")
>
> I think ptxd_get_ptxconf should work here. And I think you should use
> PTXCONF_TARGET_EXTRA_CFLAGS and PTXCONF_TARGET_EXTRA_CPPFLAGS.

I did not know that, I will look into that.

>>      # ask the compiler for the lib
>> -    lib_path="$(${CC} -print-file-name=${lib})"
>> +    lib_path="$(${CC} ${extra_cflags} -print-file-name=${lib})"
>>      if test "${lib_path}" = "${lib}"; then
>>       echo "install_copy_toolchain_lib: ${lib} not found" >&2
>>       return 1
>> @@ -77,9 +78,10 @@ ptxd_get_lib_path() {
>>  #
>>  ptxd_get_dl() {
>>      local dl
>> +    extra_cflags=$(source ${PTXDIST_PLATFORMCONFIG} && echo 
>> "${PTXCONF_TARGET_EXTRA_CFLAGS}")
>
> dito.

OK.

Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 1/5] [rt-tests] Use CFLAGS specified by ptxdist platformconfig

2012-03-13 Thread Remy Bohmer
Hi,

2012/3/13 Michael Olbrich :
>> +-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
>> ++CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include $(CXXFLAGS)
>
> This should be:
> CFLAGS = $(CPPFLAGS) -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include $(CFLAGS)
>
> CFLAGS is for C CXXFLAGS for C++ and CPPFLAGS in theory for the
> preprocessor and therefore often used to pass flags for both.
> And note the order.

Hmm, I knew that, not sure why I used CXXFLAGS...
Will fix it.

> And you should probably set:
>
> LIBS = $(LDFLAGS) -lrt -lpthread
>
> The flags should come first here.

Will check that.

Thanks.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 5/5] [x86_64, libc] Link /usr/lib/libdl.so is not needed and wrong on x86_64

2012-03-12 Thread Remy Bohmer
This link is always being generated and it is assumed that it must
always point to /lib/libdl.so.2.
But this script is not needed and points to the wrong location when a
multilib toolchain is being used where the dynamic linker must be in
/lib64

Signed-off-by: Remy Bohmer 
---
 rules/glibc.make |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/rules/glibc.make b/rules/glibc.make
index 3ddf249..2de7a13 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -57,7 +57,6 @@ endif
 
 ifdef PTXCONF_GLIBC_DL
@$(call install_copy_toolchain_lib, glibc, libdl.so.2)
-   @$(call install_link, glibc, ../../lib/libdl.so.2, /usr/lib/libdl.so)
 endif
 
 ifdef PTXCONF_GLIBC_CRYPT
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 4/5] [x86_64, libc] on multilib do not put all dynamic linkers in /lib

2012-03-12 Thread Remy Bohmer
It is assumed by the makefiles that all dynamic linkers must be put in
/lib. This is however not true. Especially on multilib configurations this
information cannot be guessed. By looking in the sysroot of the compiler
toolchain the right paths can be found. Default the scripts already look
there, so remove the unneeded options.

Signed-off-by: Remy Bohmer 
---
 rules/glibc.make|2 +-
 rules/post/install.make |9 +++--
 rules/uclibc.make   |2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/rules/glibc.make b/rules/glibc.make
index c4e6724..3ddf249 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -36,7 +36,7 @@ $(STATEDIR)/glibc.targetinstall:
@$(call install_fixup, glibc,DESCRIPTION,missing)
 
 ifdef PTXCONF_GLIBC_LD
-   @$(call install_copy_toolchain_dl, glibc, /lib)
+   @$(call install_copy_toolchain_dl, glibc)
 endif
 
 ifdef PTXCONF_GLIBC_C
diff --git a/rules/post/install.make b/rules/post/install.make
index 4ad7f87..190ec28 100644
--- a/rules/post/install.make
+++ b/rules/post/install.make
@@ -317,17 +317,14 @@ install_copy_toolchain_lib =  
\
 # install_copy_toolchain_dl
 #
 # $1: xpkg label
-# $2: destination
-# $3: strip (y|n)  default is to strip
+# $2: strip (y|n)  default is to strip
 #
 install_copy_toolchain_dl =
\
XPKG=$(subst _,-,$(strip $(1)));
\
-   DST="$(strip $2)";  
\
-   STRIP="$(strip $3)";
\
-   test "$${DST}" != "" && DST="-d $${DST}";   
\
+   STRIP="$(strip $2)";
\
$(call install_check, install_copy_toolchain_dl);   
\
${CROSS_ENV_CC} $(CROSS_ENV_STRIP) PKGDIR="$(PKGDIR)"   
\
-   $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l LINKER 
$${DST} -s "$${STRIP}"
+   $(SCRIPTSDIR)/install_copy_toolchain.sh -p "$${XPKG}" -l LINKER 
-s "$${STRIP}"
 
 #
 # install_copy_toolchain_other
diff --git a/rules/uclibc.make b/rules/uclibc.make
index 22583fd..c6cc86f 100644
--- a/rules/uclibc.make
+++ b/rules/uclibc.make
@@ -30,7 +30,7 @@ $(STATEDIR)/uclibc.targetinstall:
@$(call install_fixup, uclibc,DESCRIPTION,missing)
 
 ifdef PTXCONF_UCLIBC
-   @$(call install_copy_toolchain_dl, uclibc, /lib)
+   @$(call install_copy_toolchain_dl, uclibc)
 endif
 
 ifdef PTXCONF_UCLIBC_C
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make

2012-03-12 Thread Remy Bohmer
Busybox make is not properly called in case:
* compiler name tuple does not match target tuple (as used in multilib
  compilers, for example: i686-pc-linux-gnu-gcc can compile for
  x86_64-unknown-linux-gnu targets. To solve this the 'SUBARCH' need to be
  set)
* CONFIG_EXTRA_CFLAGS need to e set to select the proper sysroot to
  compile against in busybox
* LDFLAGS to link against the proper sysroot.

Signed-off-by: Remy Bohmer 
---
 rules/busybox.make |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/rules/busybox.make b/rules/busybox.make
index 536aa80..42cb81c 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -49,9 +49,12 @@ $(STATEDIR)/busybox.prepare:
 
 BUSYBOX_MAKE_OPT := \
ARCH=$(PTXCONF_ARCH_STRING) \
+   SUBARCH=$(PTXCONF_ARCH_STRING) \
CROSS_COMPILE=$(COMPILER_PREFIX) \
CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \
HOSTCC=$(HOSTCC) \
+   CONFIG_EXTRA_CFLAGS="$(PTXCONF_TARGET_EXTRA_CFLAGS)" \
+   LDFLAGS="$(PTXCONF_TARGET_EXTRA_LDFLAGS)" \
SKIP_STRIP=y
 
 ifdef PTXCONF_BUSYBOX_RFKILL
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/5] [x86_64] Add some support for multilib detection in the toolchain

2012-03-12 Thread Remy Bohmer
For Sourcery Codebench toolchains the 'gcc -print-file-name' only returns
the proper sysroot directory when the proper architecture flags are
provided via '-m64 -march=' flags. These flags are provided via the
ptxdist platformconfig PTXCONF_TARGET_EXTRA_CFLAGS setting.
These flags therefore also need to be passed to GCC here.

Signed-off-by: Remy Bohmer 
---
 scripts/install_copy_toolchain.sh |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/install_copy_toolchain.sh 
b/scripts/install_copy_toolchain.sh
index 8a67698..48d65d7 100755
--- a/scripts/install_copy_toolchain.sh
+++ b/scripts/install_copy_toolchain.sh
@@ -50,12 +50,13 @@ ptxd_abs2rel() {
 # out: $lib_path
 #
 ptxd_get_lib_path() {
-local lib lib_dir lib_path
+local lib lib_dir lib_path extra_cflags
 
 lib="${1}"
+extra_cflags=$(source ${PTXDIST_PLATFORMCONFIG} && echo 
"${PTXCONF_TARGET_EXTRA_CFLAGS}")
 
 # ask the compiler for the lib
-lib_path="$(${CC} -print-file-name=${lib})"
+lib_path="$(${CC} ${extra_cflags} -print-file-name=${lib})"
 if test "${lib_path}" = "${lib}"; then
echo "install_copy_toolchain_lib: ${lib} not found" >&2
return 1
@@ -77,9 +78,10 @@ ptxd_get_lib_path() {
 #
 ptxd_get_dl() {
 local dl
+extra_cflags=$(source ${PTXDIST_PLATFORMCONFIG} && echo 
"${PTXCONF_TARGET_EXTRA_CFLAGS}")
 
 dl="$(echo 'int main(void){return 0;}' | \
-   ${CC} -x c -o /dev/null -v - 2>&1 | \
+   ${CC} ${extra_cflags} -x c -o /dev/null -v - 2>&1 | \
sed -n -e 's/.* -dynamic-linker \([^ ]*\).*/\1/p')"
 
 echo "${dl##*/}"
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 1/5] [rt-tests] Use CFLAGS specified by ptxdist platformconfig

2012-03-12 Thread Remy Bohmer
The platformconfig can specify some valuable global flags for each
package in the configuration to build, for example:
* CPU optimisations (-march= and friends)
* multilib toolchain selection between x86_64 and ia32 such as used for
  the Sourcery Codebench compiler toolchains as specified here:
  https://sourcery.mentor.com/sgpp/lite/ia32/portal/doc12648/getting-started.pdf

Signed-off-by: Remy Bohmer 
---
 patches/rt-tests-0.73/add-extra-cflags.patch |   23 +++
 patches/rt-tests-0.73/series |1 +
 rules/rt-tests.make  |1 +
 3 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 patches/rt-tests-0.73/add-extra-cflags.patch

diff --git a/patches/rt-tests-0.73/add-extra-cflags.patch 
b/patches/rt-tests-0.73/add-extra-cflags.patch
new file mode 100644
index 000..6809377
--- /dev/null
+++ b/patches/rt-tests-0.73/add-extra-cflags.patch
@@ -0,0 +1,23 @@
+CFLAGS are specified in environment as well
+
+If the environment already has specified CFLAGS we shall
+not overwrite them
+
+Signed-off-by: Remy Bohmer 
+---
+ Makefile |2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: rt-tests-0.73/Makefile
+===
+--- rt-tests-0.73.orig/Makefile
 rt-tests-0.73/Makefile
+@@ -14,7 +14,7 @@ bindir  ?= $(prefix)/bin
+ mandir?= $(prefix)/share/man
+ srcdir?= $(prefix)/src
+ 
+-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
++CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include $(CXXFLAGS)
+ 
+ PYLIB  := $(shell python -c 'import distutils.sysconfig;  print 
distutils.sysconfig.get_python_lib()')
+ 
diff --git a/patches/rt-tests-0.73/series b/patches/rt-tests-0.73/series
index 74fbce0..caf1a74 100644
--- a/patches/rt-tests-0.73/series
+++ b/patches/rt-tests-0.73/series
@@ -1 +1,2 @@
 fix_3_0_issue.diff
+add-extra-cflags.patch
diff --git a/rules/rt-tests.make b/rules/rt-tests.make
index 3bc6568..1880beb 100644
--- a/rules/rt-tests.make
+++ b/rules/rt-tests.make
@@ -34,6 +34,7 @@ RT_TESTS_DIR  := $(BUILDDIR)/$(RT_TESTS)
 
 RT_TESTS_CONF_TOOL := NO
 RT_TESTS_MAKE_OPT  := $(CROSS_ENV_CC) prefix=/usr
+RT_TESTS_MAKE_ENV  := $(CROSS_ENV_FLAGS)
 RT_TESTS_INSTALL_OPT   := $(RT_TESTS_MAKE_OPT) install
 
 # 
-- 
1.7.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 7/7] ARM: remove now unused ARM SoC selection

2011-03-04 Thread Remy Bohmer
2011/3/4 Sascha Hauer :
> They are now unused and should never be introduced again. If anything,
> we want to depend on the ARM architecture, but not on specific SOCs.

OK, now I see why you want to do that :-)

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 1/7] at91bootstrap: depend on ARCH_ARM instead of ARM_AT91SAM926X

2011-03-04 Thread Remy Bohmer
Hi,

2011/3/4 Sascha Hauer :
> While being useful on at91 only there is no technical reason
> to not build this tool on any other ARM processor.
>
> Signed-off-by: Sascha Hauer 
> ---
>  platforms/at91bootstrap.in |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/platforms/at91bootstrap.in b/platforms/at91bootstrap.in
> index 9b95664..6794897 100644
> --- a/platforms/at91bootstrap.in
> +++ b/platforms/at91bootstrap.in
> @@ -2,7 +2,7 @@
>
>  menuconfig AT91BOOTSTRAP
>        bool
> -       depends on ARCH_ARM_AT91SAM926X
> +       depends on ARCH_ARM

I do not see a reason why you want to change that, but anyway:
Acked by: Remy Bohmer 

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] arm-linux-gnueabi-gcc from ubuntu

2010-12-05 Thread Remy Bohmer
Hi,

2010/12/4 Stéphane List :
> Hi,
>
> Is it possible to use the toolchain provided by Ubuntu instead of the
> toolchain provided by Oselas ?
> I would like to build a small distro for arm with ptxdist.

If you do not want to compile a toolchain yourself, why not use the
toolchains from CodeSourcery?
(http://www.codesourcery.com/sgpp/lite/arm/)
These are proven to work with ptxdist (We use them for some of our ARM
based products)

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] unmet direct dependencies (COLLECTION)

2010-11-18 Thread Remy Bohmer
Hi,

I just pulled the latest git tree of ptxdit with the Kconfig update to
2.6.37-rc2 version.
Now I see the warnings below. I do not think they harm, any idea how
to get rid of them?

---
--> Running: 'ptxdist allyesconfig collection'
---
warning: (COLLECTION_ALL) selects ATOP which has unmet direct
dependencies (COLLECTION)
warning: (COLLECTION_ALL) selects CANUTILS which has unmet direct
dependencies (COLLECTION)
warning: (COLLECTION_ALL) selects GDB which has unmet direct
dependencies (COLLECTION)
warning: (COLLECTION_ALL) selects GDBSERVER which has unmet direct
dependencies (COLLECTION)
warning: (COLLECTION_ALL) selects LATENCYTOP which has unmet direct
dependencies (COLLECTION)


BTW: nconfig looks good, xconfig would be great too ;-))

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add dependencies to patches while using GIT as patch tool

2010-11-15 Thread Remy Bohmer
Hi,

2010/11/15 Enrico Weigelt :
> * Remy Bohmer  schrieb:
>
> Hi,
>
> 
>
> I'm now using git as the _primary_ sourcecode management for
> about 2 years, and I don't have single patches anymore.

Cool!

> My buildsystem (Briegel) directly checks out the source tree

Sorry, but this sounds like an advertisement...

> via git, coming from normalized repositories (eg. canonical
> version numbers and tags, repo locations, etc) which I maintain
> in the OSS-QM project.

We do not want to check out complete git trees. We only want to use
stable released versions of source packages.
These source packages sometimes need to be patched with some custom
patches that we can store in our SCM database.

> All my workflows are now based on git, and I'm making heavy use
> of branching and rebasing all the day. That takes less as the
> previous patch-based workflows for me.

> Maybe it's time to give an completely git-based sourcecode
> management a try ;-p

Well, we store the patches, source packages, ptxdist projects and
tools into the same SCM database as the entire company uses for our
proprietary sourcecode. Every project inside the organisation can find
another SCM tool that might suit their own projects workflow better,
but it is corporate wide more efficient to standardise on tools and
workflows. Git is a great tool but it has its drawbacks too,
especially if it needs to be used as a centralised SCM tool.

Ptxdist suits perfectly with our needs, and we are very happy using
it. We have no plans to move over to another buildsystem, especially
not to buildsystems that are not as mature, feature-rich,
qualitatively and reliably as Ptxdist is ;-)

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] Add dependencies to patches while using GIT as patch tool

2010-11-12 Thread Remy Bohmer
Hi,

>> @@ -1354,6 +1356,11 @@ parse_first()
>>               --git)
>>                       # overwrite default from ptxdistrc
>>                       export PTXCONF_SETUP_PATCHIN_GIT=y
>> +                     export PTXCONF_SETUP_PATCHIN_GIT_PKG_LIST="*"
>
> Hmm, maybe a --git="kernel barebox" would be nice...

Agreed, but I thought to not make it to fancy in the first patch ;-)

> An idea here: force git for packages in PTXCONF_SETUP_PATCHIN_GIT_PKG_LIST
> (if it's not *) even if there are no patches. Starting the first patch is
> not very easy right now. Maybe use ${PTXDIST_TOPDIR}/patches/ if ptxdist is
> a not release version and the directory is writeable. Otherwise fall back
> to ${PTXDIST_WORKSPACE}/patches
> What do you think?

100% agreed. I thought about that too, but again not trying to make it
too fancy in the first run.

Note that it could also be an option to always start with the ptxdist
patches, followed by the project defined patches.
We tend to keep on copying the ptxdist patches to the project patches
directory if we want to add something new, and we tend to forget to
synchronise these copied patches when we update ptxdist...

>> +# $(1): options to be passed to the touch command
>>  touch =                                              \
>>       target="$(strip $(@))";                 \
>> -     touch "$${target}";                     \
>> +     touch "$${target}" $(1);                \
>>       target="$${target\#\#*/}";              \
>>       $(_touch_opt_output)                    \
>>       echo "finished target $${target}"
>
> I don't like this. We had a parameter for touch before. And there still
> Makefiles with it out there. I don't think it breaks with those, but it's
> still not nice.

hmm, I happened to like this trick ;-))

>> diff --git a/rules/post/ptxd_make_world_patchin.make 
>> b/rules/post/ptxd_make_world_patchin.make
>> index 48c72a1..39c9652 100644
>> --- a/rules/post/ptxd_make_world_patchin.make
>> +++ b/rules/post/ptxd_make_world_patchin.make
>
> This should go to rules/post/ptxd_make_world_update.make

I expected this remark already ;-)

>> @@ -18,4 +18,36 @@ patchin = \
>>       pkg_deprecated_patchin_series="$(call ptx/escape,$(3))" \
>>       $(call world/patchin, $(1))
>>
>> +world/update = \
>> +     pkg_target_update=$@; \
>> +     pkg_target_extract=$${pkg_target_update/%update/extract}; \
>
> I don't like this here. Maybe define it as
> ${ptx_state_dir}/${pkg_label}. in the script.

OK

>> +     pkg_deprecated_patchin_dir="$(call ptx/escape,$(2))" \
>> +     pkg_deprecated_patchin_series="$(call ptx/escape,$(3))" \
>
> These are named _deprecated_ for a reason. They only exist in patchin for
> backwards compatibility.

I did not understood exactly why it was there in the first place, but
we call the patchin scripts from within the update stage. So, I
figured it would not hurt to add it.

>> +     $(call world/env, $(1)) \
>> +     pkg_patch_series="$(call ptx/escape,$(call remove_quotes, 
>> $(PTXCONF_$(strip $(1))_SERIES)))" \
>
> This should be in ptxd_make_world_common.make. A separate patch to move it
> please.

OK

>> +     ptxd_make_world_update
>> +
>> +update = \
>> +     $(call targetinfo) \
>> +     $(call world/update,$(1),$($(1)_DIR)); \
>> +     if [ $$? -eq 0 ]; then \
>> +         $(call touch,-r $@); \
>> +     else \
>> +         echo "package not up-to-date"; \
>> +         $(call touch); \
>> +     fi
>
> Not sure I like this. The return value should be reserved to indicate
> failure.

OK

>> +
>> +# The update target is dependant on FORCE to force it to be called on every
>> +# incremental 'ptxdist go'. It checks for changed patches, and if some 
>> patch has
>> +# changed, it will update the *.update target. This update triggers the 
>> rebuild
>> +# of prepare, compile and so on.
>> +
>> +### --- for KLIBC packages only ---
>> +$(STATEDIR)/klibc-%.update: FORCE
>> +     @$(call update,$(PTX_MAP_TO_PACKAGE_klibc-$(*)))
>> +
>> +### --- all but KLIBC packages ---
>> +$(STATEDIR)/%.update: FORCE
>> +     @$(call update,$(PTX_MAP_TO_PACKAGE_$(*)))
>
> This means _always_ running ptxd_make_world_update for all packages. I
> don't like that.
>
> How about this: for all packages that should be updated:
> - create (in dgen) a target that checks if updating is necessary
> - if yes then delete $(STATEDIR)/.update
> -force it and have $(STATEDIR)/.update depend on it.
> --> ptxd_make_world_update is called when necessary.
> --> no ugly touch tricks needed
>
> or create a generic check stage and only add the dependency for the
> relevant packages.

I have to look into that.

>>       clean)
>>               COMPREPLY=( $( compgen -W "${opts} $( ptxdist print 
>> PTX_PACKAGES_SELECTED ) root" -- $cur ) )
>>               ;;
>>       drop)
>> -             COMPREPLY=( $( compgen -W "${opts} $( pushd $(ptxdist print 
>> PTXDIST_PLATFORMDIR)/state >/dev/null; ls 
>> +(*.get|*.extract|*.prepare|*.compile|*.install|*.targetinstall); popd 
>> >/de

[ptxdist] [PATCH] Add dependencies to patches while using GIT as patch tool

2010-11-11 Thread Remy Bohmer
Currently the following drawbacks exist with applying patches with quilt and
git:
* When a developer is working on a source tree in build-*/* and the
  contents of the patches directory changes due to an updated patch the changes
  do not find its way to the working tree, unless the developer performs a
  'quilt pop -a && quilt push -a'. If someone else edited the same patch as the
  developer is working on, the risk exist that the changes of the other
  developer get lost (this happens if a developer does a 'quilt pop -a' until
  failure followed by a 'quilt refresh' without looking carefully at the
  changes)
* Changes to source files must always be explicitly added to a patch otherwise
  the change dangles around and will get lost on a package rebuild, which will
  (not infrequently) only be discovered by other developers who runs into broken
  code.
* By using the GIT tool (PTXCONF_SETUP_PATCHIN_GIT) to apply patches only the
  tree is being _generated_ by means of git. There is no useful tool yet to
  extract the new changes done by a developer out of the git-tree. The current
  git-alias 'ptx-patches' dumps the entire series of patches applied to the
  patches directory, but this always results in a patch series that is entirely
  different compared to the series that was used to generate the git-tree, even
  if no single line of code has been touched of that package.

To improve these issues the following changes are made by this patch:
* When PTXCONF_SETUP_PATCHIN_GIT is set, git is being used as patch apply tool
  as usual, but a label (patches_current) is created on the last commit that has
  been applied to indicate the reference point of the contents of the patches
  directory. An md5sum is stored in the tag that matches all these patches.
* When the contents of the patches directory changes, the md5sum of the patches
  will change. This will be the trigger to rebuild the source tree with the new
  patch series. All local commits in the git repo of that package will be
  automatically rebased on top of the new series. This will only happen in case
  the git-tree has no local uncommitted changes. If that is the case the user
  will be notified and the build will be stopped.
* This regeneration of the build tree is done in a new intermediate stage called
  'update'. This intermediate stage has found its place between the 'extract'
  and the 'prepare' stage. The 'update' stage will be executed on every
  incremental build, and will touch its stage file _only_ when something has
  changed or if the 'extract' stage is newer compared to the 'update' stage.
  This makes sure the 'prepare' stage will run, and so the 'compile' and all
  other subsequent stages will run when a patch has changed.
  Note: This stage is transparant in case 'quilt' or 'patch' is being used as
  patch tool.
* On every incremental build all local changes to the source tree in build-*/*
  that are committed in the local git repo will be exported to a per package
  'patches/staged' directory. The developer can move the patches that are stored
  here (by hand) to the normal 'patches' directory and add them by hand to the
  series file. This prevents the situation that the developer will loose his
  local committed changes if by accident a 'make clean' is being executed. Note
  that exporting the patches to a staged directory instead of the normal patches
  directory also prevents that the source tree is automatically being rebuild
  after every commit in the git repo, which can safe a huge amount of time.
  Every change in the patches directory would result in a regeneration of the
  build tree as described in the 2nd bullet above. Regeneration of the source
  tree usually ends up in a complete rebuild of the package which could take
  quite some time, while an incremental build of the package can be very fast.
* Using git to apply patches is rather slow, PTXCONF_SETUP_PATCHIN_GIT_PKG_LIST
  can be used to specify the packages that need to be extracted by using git.
* Adding dependencies can slow down incremental build times by seconds, since
  on every incremental build the md5sums are calculated of the patch-series.
  (Experience show for a 6MB patchset about 1 second). If this is annoying
  or unwanted, the setting PTXCONF_SETUP_PATCHIN_GIT_DEPENDENCIES can be used
  to disable the dependency check globally. To enable the dependencies only on
  a single package the PTXCONF_SETUP_PATCHIN_GIT_PKG_LIST can be used to limit
  the number of packages that use git as patch tool.
* An option --no-git is added to the cmd-line to disable the git-usage
  temporarily. It also disables the dependencies mechanism for that build, even
  if the source package was extracted with git.
* The git-alias ptx-patches still works as usual.
* quilt and patch wor

Re: [ptxdist] [PATCH] fix failing cd in prepare stage if _CONF_TOOL=NO and empty extract

2010-11-01 Thread Remy Bohmer
Hi,

2010/11/1 Michael Olbrich :
> On Mon, Nov 01, 2010 at 03:44:27PM +0100, Remy Bohmer wrote:
>> >>                           $(STATEDIR)/kernel.install
>> >
>> > "select KERNEL" in io_can.in is possible. There is a dummy symbol for this
>> > in ptxconfig.
>>
>> Great, this was one issue that was pending. Sometimes there is a
>> dependency to a platformconfig setting that is not available in the
>> ptxconfig. Another example for such a
>> dependency-that-cannot-be-handled is a dependency to harddisk or
>> nand-flash (ext2 and parted versus ubifs). Sometimes we want to deploy
>> the same ptxconfig on X86 or ARM. This is not possible yet...
>
> Depending on what you actually do, It would be better to have this in the
> platformconfig.

I am not sure if you understood what I meant:
I meant that there are tools in for example busybox like mkfs.ext2.
These tools are only wanted, for example, when the target is standard
PC hardware with a standard sata-disk. These tools are not wanted on a
target platform that only has NAND-flash. On these platforms we would
need ubifs support (like ubiupdatevol) that on its turn is not wanted
on X86.
Further, I do not see a way to make busybox part of the
platformconfig, and even do not think that is a good idea.
If the ptxconfigs are further the same, still due to this type of
differences still 2 different config files are required, or some major
superset must be configured which has a code-size penalty...
This tool is just one example, but there are more issues like this.

No idea how to solve it though, it was just an observation...

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] fix failing cd in prepare stage if _CONF_TOOL=NO and empty extract

2010-11-01 Thread Remy Bohmer
Hi,

2010/11/1 Michael Olbrich :
> Hi,
>
> On Mon, Nov 01, 2010 at 02:08:51PM +0100, Remy Bohmer wrote:
>> 2010/11/1 Michael Olbrich :
>> > does this happen with the latest git? If there is nothing to
>> > configure/build it shouldn't get that far. Can you send the makefile?
>>
>> Yes, it happens with latest git.
>> It happens with source code build out-of-tree according to the
>> 'local_src' examples as suggested in the ptxdist manuals.
>> Please, see attached one of our many makefiles that show this problem ;-)
>> (This Makefile is located in a projects own 'rules' directory)
>
> I think some of the templates need updating... :-)

;-)

> I've added a few comments below. I think you patch is not really needed. It
> does no harm either so I may apply it anyways. In the mean time I'll think
> about improving the templates. Especially how to handle the 'copy all
> sources' case.

Thanks for the comments. I will rework them in (all) our makefiles.
There are quite a few (about 60) of those...
They seem to make the makefiles even simpler, that's good...

>> IO_CAN_TARGET_OS=linux
>> $(STATEDIR)/io_can.compile: $(STATEDIR)/libsocketcan.targetinstall \
>
> why depend on targetinstall?

I actually do not know... I have not made this file. All team-members
seem to put my name on top of every makefile they create...
@Bart: Do you know the magic answer?

>>                           $(STATEDIR)/kernel.install
>
> "select KERNEL" in io_can.in is possible. There is a dummy symbol for this
> in ptxconfig.

Great, this was one issue that was pending. Sometimes there is a
dependency to a platformconfig setting that is not available in the
ptxconfig. Another example for such a
dependency-that-cannot-be-handled is a dependency to harddisk or
nand-flash (ext2 and parted versus ubifs). Sometimes we want to deploy
the same ptxconfig on X86 or ARM. This is not possible yet...

>>
>> $(STATEDIR)/io_can.compile: ${IO_CAN_SRCDIR}/* \
>>                              ${IO_CAN_SRCDIR}/*/* \
>>                              ${IO_CAN_SRCDIR}/*/*/*
>>       @$(call targetinfo)
>>       @rm -fr $(IO_CAN_DIR)
>>       @cp -aL $(IO_CAN_SRCDIR) $(IO_CAN_DIR)
>
> how about doing this in io_can.extract?

Will test. Never actually understood it why it was all put in the
compile stage in the templates...

>>       @cd $(IO_CAN_DIR) && $(IO_CAN_ENV) $(IO_CAN_PATH) \
>>                       $(MAKE) all TARGET_OS=${IO_CAN_TARGET_OS} \
>>                       $(IO_CAN_MAKE_OPTS)
>
> IO_CAN_MAKE_OPT := \
>        all \
>        TARGET_OS=$(IO_CAN_TARGET_OS)
>
> and no compile stage.

Great!

>>       @$(call touch)
>>
>> # 
>> 
>> # Install
>> # 
>> 
>>
>> $(STATEDIR)/io_can.install:
>>       @$(call targetinfo)
>>       @cd $(IO_CAN_DIR) && $(IO_CAN_ENV) $(IO_CAN_PATH) \
>>                       $(MAKE) install TARGET_OS=${IO_CAN_TARGET_OS} \
>>                         DESTDIR=$(SYSROOT) $(IO_CAN_MAKE_OPTS)
>
> IO_CAN_INSTALL_OPT := \
>        install \
>        TARGET_OS=$(IO_CAN_TARGET_OS) \
>        DESTDIR=$(IO_CAN_PKGDIR)

And no install, whooh! :-)

>>       @$(call touch)
>>
>> # 
>> 
>> # Target-Install
>> # 
>> ----
>>
>> $(STATEDIR)/io_can.targetinstall:
>>       @$(call targetinfo)
>>       @$(call install_init, io_can)
>>       @$(call install_fixup, io_can,PACKAGE,io_can)
>>       @$(call install_fixup, io_can,PRIORITY,optional)
>>       @$(call install_fixup, io_can,VERSION,$(IO_CAN_VERSION))
>>       @$(call install_fixup, io_can,SECTION,base)
>>       @$(call install_fixup, io_can,AUTHOR,"Remy Bohmer ")
>>       @$(call install_fixup, io_can,DEPENDS,)
>>       @$(call install_fixup, io_can,DESCRIPTION,missing)
>>       @$(call install_copy, io_can, 0, 0, 0755, 
>> $(IO_CAN_DIR)/build/linux/libcan.so.1.0, /usr/lib/libcan.so.1.0)
>>       @$(call install_link, io_can, libcan.so.1.0, /usr/lib/libcan.so.1)
>>       @$(call install_link, io_can, libcan.so.1.0, /usr/lib/libcan.so)
>
>       �...@$(call install_lib, io_can, 0, 0, 0644, libcan)
>
> this looks for $(IO_CAN_PKGDIR)/{,usr/}lib/libcan.so*

This was not possible yet when this file was created ;-)))
Bart was already updating those...

Thanks.

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Patch stage

2010-11-01 Thread Remy Bohmer
Hi,

>> I did it with md5 sums of the patches, and even on a heavily patched
>> package (kernel with 7MB of patches) it can be determined if patches
>> have changed within about 1 second. Most packages do not have such a
>> big patchset, so checking will go faster.
>
> For short operations ptxdist is already too slow. e.g. running "ptxdist go"
> when it's already up to date. Adding several seconds to that is not
> acceptable. And with currently 200 patched packages in ptxdist (= 5MB)
> doing md5 sums will add that much.

Indeed, it might take a few seconds on a complete build.

But, while running 'ptxdist go' it needs to check dependencies before
it can even _know_ that ' it's already up-to-date', not checking is
_assuming_ it is 'up-to-date'. Running with blindfolds on is likely
the fastest on the short term, but it might take more time in the end
when it is discovered that some change was not in that incremental
build due to lack on dependencies ;-)
Checking dependencies cannot be done without taking time... It can be
made an option that a user can enable/disable.

> ptxdist uses a small script to just use "patch" to apply the patches if
> quilt is not found.

OK

>> > Another issue: Some (broken) packages modify distributed files when
>> > compiling. How can you distinguish this from manual changes?
>>
>> For example via .gitignore which can be added/patched to ignore such files.
>
> True, but that's not something you want to do for all packages.

Yep, I noticed ;-)
(I already added a default gitignore file for packages that do not
have one, that makes the problem smaller, but does not solve it)

> How about a slightly different approach:
> - Keep the extract stage as it is.

That is what I currently have working here ;-)

> - add an extract.post that does nothing for patch/quilt, but does the fancy
>  git stuff for git.

Indeed, this is what I also have, except that the stage is called
'patchin' instead of 'extract.post'.
I can sed s%%%g that ;-)

I made the target dependent on 'FORCE', and it only touches the make
target in case the 'prepare' stage actually has to run.

> And think about how we could tell ptxdist 'only do this fancy stuff for
> packages x, y'.

Configure option via 'ptxdist setup' via a comma separated list with
names of packages an option?

> Extracting with git is a lot slower. There is no reason to use it for 
> packages we just want to build,

Agreed.

I will update the patchset I currently have, and post it in a couple
of days for review.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] fix failing cd in prepare stage if _CONF_TOOL=NO and empty extract

2010-11-01 Thread Remy Bohmer
Hi,

2010/11/1 Michael Olbrich :
> Hi,
>
> does this happen with the latest git? If there is nothing to
> configure/build it shouldn't get that far. Can you send the makefile?

Yes, it happens with latest git.
It happens with source code build out-of-tree according to the
'local_src' examples as suggested in the ptxdist manuals.
Please, see attached one of our many makefiles that show this problem ;-)
(This Makefile is located in a projects own 'rules' directory)

Kind regards,

Remy


io_can.make
Description: Binary data
-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] fix failing cd in prepare stage if _CONF_TOOL=NO and empty extract

2010-10-30 Thread Remy Bohmer
In case the extract stage is empty and _CONF_TOOL is set to NO, then
the prepare stage fails. First a cd was done to the build_dir, but that
does not exist when the extract is empty. This makes the prepare stage fail
while we told it with _CONF_TOOL=NO to skip that stage

Signed-off-by: Remy Bohmer 
---
 scripts/lib/ptxd_make_world_prepare.sh |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_prepare.sh 
b/scripts/lib/ptxd_make_world_prepare.sh
index 2dfc13d..718fd12 100644
--- a/scripts/lib/ptxd_make_world_prepare.sh
+++ b/scripts/lib/ptxd_make_world_prepare.sh
@@ -110,10 +110,10 @@ ptxd_make_world_prepare() {
mkdir -p -- "${pkg_build_dir}" || return
 fi
 
-cd -- "${pkg_build_dir}" &&
 case "${pkg_conf_tool}" in
autoconf|cmake|qmake)
-   ptxd_make_world_prepare_"${pkg_conf_tool}" ;;
+cd -- "${pkg_build_dir}" &&
+   ptxd_make_world_prepare_"${pkg_conf_tool}" ;;
"NO") echo "prepare stage disabled." ;;
"")   echo "No prepare tool found. Do nothing." ;;
*)ptxd_bailout "automatic prepare tool selection failed. Set 
_CONF_TOOL";;
-- 
1.7.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] Patch stage

2010-10-30 Thread Remy Bohmer
Hi,

2010/10/29 Michael Olbrich :
> Hi,
>
> On Fri, Oct 29, 2010 at 05:03:58PM +0200, Remy Bohmer wrote:
>> I am figuring out how to make the patching of the packages more
>> flexible. Currently we can use quilt and git to extract the packages.
>>
>> I want to:
>> * Add a dependency mechanism to the per package patch series by adding
>> an automated restart of the prepare and compile stage if the patches
>> of the package have changed. This should kick in during an incremental
>> build.
>
> I actually implemented that some time ago when we merged the patch to
> trigger targetinstall. The problem with it is, that it causes unnecessary
> rebuilds. It's not uncommon for me to switch between various ptxdist
> branches which may change the timestamps for the patches...
> I have not found a fast way to detect real changes to the patches.

I did it with md5 sums of the patches, and even on a heavily patched
package (kernel with 7MB of patches) it can be determined if patches
have changed within about 1 second. Most packages do not have such a
big patchset, so checking will go faster.

>> * Add a mechanism to export all local changes to the patches directory
>> if a developer has committed some changes into the package-git
>> repository. (If he was using git to extract the patches)
>>
>> A week ago I posted a patch that shows the concept of this mechanism,
>> but I got no remarks yet on that patch. I know it was an ugly hack,
>> but it was only meant to show an idea.
>
> I have not had the time to really look at it.

OK

>> I have found a better way to implement it in ptxdist, but that would
>> require the patching of a package to become a separate build stage
>> between 'extract' and 'prepare'.
>> The current extract stage always performs the actions 'remove',
>> 'extract', and 'patch', while I actually require a patch stage that
>> does NOT remove the existing source tree.
>
> I've read the comment (not the patch) so I can see how this can be useful.
> However: I'm concerned that this may result in build failures. E.g. a user
> aborts ptxdist during patchin. Can we recover from this? Manually calling
> "ptxdist clean " is not acceptable here.

We have found a way to recover from this with git, but with quilt it
is somewhat more complicated to implement.
In general, I would prefer to leave quilt as-is with no regression,
and to add the fancy dependency stuff to the git-implementation.
It must still also be feasible to use the exact same patchset for both
quilt and git and switch between both at will.

> And it must work without quilt, git, etc.

What do you mean with this exactly?
During the patch stage we use quilt OR git. So, to repair an
interrupted patchin stage we can use git or quilt, or not?

> Another issue: Some (broken) packages modify distributed files when
> compiling. How can you distinguish this from manual changes?

For example via .gitignore which can be added/patched to ignore such files.

>> I can post a patch for this (I have it working), but I was wondering
>> if it would have any chance for being accepted.
>> There are several options:
>> * We can add a dummy patch stage first, and leave the initial patching
>> in the extract stage for the time being. Later on, we can modify all
>> makefiles and move the 'call patchin' to a default makerule.
>> * I can post a patch that does it all in one go.
>
> Add the stage and move patchin in the default rule. This should not break
> any packages with an explicit extract stage.

There were also packages with an empty 'extract'  stage. In that case
there is nothing to patch either.
A default rule with only patchin would try to patch a tree that does not exist.
I figured that this can be determined by checking if the
package-directory does exist when starting the patch stage.
Alternative is to add an empty patch stage to these makefiles as well,
but that would touch quite a few files. Your commit e268c92 changes
some things in this area, I have to look at that commit in detail,
probably this is not relevant any more.

> It just means that patchin
> runs twice for these packages. That's the same as dropping the patchin
> stage.

That is exactly the goal. patchin must be able to be called multiple
times in a row.
During that stage the status of the patches can be validated, and if
needed the local changes can be rebased.

> Whatever you do please keep in mind that the most common use case,
> especially for inexperienced users is: just build the new stuff. This must
> continue to work without any additional complications.

100% agreed. The goal here is also to make it easier for the
inexperienced users to make less mistakes by doing things more
automatically.
If you feel that there are some regressions somewhere, just NAK the
patches I am going to post ;-)))

Thanks. Will be continued soon.

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] Patch stage

2010-10-29 Thread Remy Bohmer
Hi,

I am figuring out how to make the patching of the packages more
flexible. Currently we can use quilt and git to extract the packages.

I want to:
* Add a dependency mechanism to the per package patch series by adding
an automated restart of the prepare and compile stage if the patches
of the package have changed. This should kick in during an incremental
build.
* Add a mechanism to export all local changes to the patches directory
if a developer has committed some changes into the package-git
repository. (If he was using git to extract the patches)

A week ago I posted a patch that shows the concept of this mechanism,
but I got no remarks yet on that patch. I know it was an ugly hack,
but it was only meant to show an idea.

I have found a better way to implement it in ptxdist, but that would
require the patching of a package to become a separate build stage
between 'extract' and 'prepare'.
The current extract stage always performs the actions 'remove',
'extract', and 'patch', while I actually require a patch stage that
does NOT remove the existing source tree.

I can post a patch for this (I have it working), but I was wondering
if it would have any chance for being accepted.
There are several options:
* We can add a dummy patch stage first, and leave the initial patching
in the extract stage for the time being. Later on, we can modify all
makefiles and move the 'call patchin' to a default makerule.
* I can post a patch that does it all in one go.

What do you think?

Kind regards,

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [RFC] Add some useful features for applying of patches via GIT

2010-10-22 Thread Remy Bohmer
Hi,

This patch is just meant to show a concept. It is not considered finished yet.
I would like to get feedback on the concept early. What do you think of it?

(Of course, normal review comments are welcome too.)

Kind regards,

Remy

Currently the following drawbacks exist with quilt:
1)When a developer is working on a source tree in build-target/* and the
  contents of the patches directory changes (due to someone else who
  checked in a task in a SCM tool) the changes do not find its way to the
  working tree, unless the developer performs a 'quilt pop -a &&
  quilt push -a'. If someone else edited the same patch as the developer
  is working on, the risk exist that the changes of the other developer
  got lost (this happens if a developer does a
  'quilt pop -a' until failure followed by a 'quilt refresh')
2)Changes to source files must always be explicitly added to a patch
  otherwise the change dangles around and will get lost on a package
  rebuild, which will (not infrequently) only be discovered by other
  developers who run into broken code.

By using the GIT tool (PTXCONF_SETUP_PATCHIN_GIT) to apply patches only
the tree is being generated by means of git. There is no useful tool yet
to extract the new changes done by a developer out of the git-tree. The
current git-alias only dumps the entire series of patches applied to the
patches directory, and they are always different compared to the previous
files that were used as its base. It is not taken into account that changes
by other users have impact on the patch series.

So,this patch tries to add the following functionality to solve these
issues:
g1)A developer can use git as he is used to. He just needs to work on the
   master branch, because that is the one that is always being build.
   Once the contents of the patches directory changes the git-tree
   is rebuild and the developers own changes are rebased on top of the
   patches inside the git tree. This will only take place if the git-tree
   is clean, that is if no uncommitted changes are pending.
g2)On every compile the developers own commits in the git-tree are exported
   to a 'staged' directory inside the patches directory.
g3)The developer can add these 'staged' patches to the series file, but
   once he does that step 'g1' kicks in, namely rebasing of the entire
   tree, and that usually means a complete rebuilt of the package.
g4)The git trees are only used locally inside the build-target dir. It is
   not used to share with others, this is similar to quilt usage.
g5)The older git-alias still works for people who are used to it (although
   I cannot think of a usable use case for it)
g6)The patches directory is ALWAYS leading, just as it was with quilt

Signed-off-by: Remy Bohmer 
---
 scripts/lib/ptxd_make_world_compile.sh |1 +
 scripts/lib/ptxd_make_world_patchin.sh |   97 +++-
 scripts/lib/ptxd_make_world_prepare.sh |1 +
 3 files changed, 98 insertions(+), 1 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_compile.sh 
b/scripts/lib/ptxd_make_world_compile.sh
index 3647e82..756e2d9 100644
--- a/scripts/lib/ptxd_make_world_compile.sh
+++ b/scripts/lib/ptxd_make_world_compile.sh
@@ -12,6 +12,7 @@
 #
 ptxd_make_world_compile() {
 ptxd_make_world_init &&
+ptxd_make_world_patchin_verify &&
 
 eval \
"${pkg_path}" \
diff --git a/scripts/lib/ptxd_make_world_patchin.sh 
b/scripts/lib/ptxd_make_world_patchin.sh
index 6afe17e..078681d 100644
--- a/scripts/lib/ptxd_make_world_patchin.sh
+++ b/scripts/lib/ptxd_make_world_patchin.sh
@@ -101,6 +101,7 @@ export -f ptxd_make_world_patchin_apply_git_init
 #
 ptxd_make_world_patchin_apply_git_compat()
 {
+rm -rf "${pkg_patchin_dir}/.ptxdist/git-patches" || return
 mkdir "${pkg_patchin_dir}/.ptxdist/git-patches" || return
 
 local patch para
@@ -115,6 +116,7 @@ ptxd_make_world_patchin_apply_git_compat()
 
case "${patch}" in
""|"#"*) continue ;;# skip empty lines and comments
+   *staged*) continue;;# skip all patches in the staged dir
*.gz)  cat="zcat" ;;
*.bz2) cat="bzcat" ;;
*)
@@ -145,10 +147,103 @@ ptxd_make_world_patchin_apply_git()
 
 git quiltimport \
--patches "${pkg_patchin_dir}/.ptxdist/git-patches" \
-   --author "unknown author "
+   --author "unknown author " || return
+
+# Store the md5 of all the patches we just applied. This is used to 
determine
+# if the original patch series has been changed. When those have changed
+# we need to rebuild the git tree from scratch and rebase all local 
modifications
+# on top of the new tree.
+patches_current_md5=$(find ${pkg_patchin_dir}/.ptxdist/patches/ -type f | \
+   grep -v '/staged/

Re: [ptxdist] selected_toolchain link broken

2010-07-16 Thread Remy Bohmer
Hi,

2010/7/16 Michael Olbrich :
> On Fri, Jul 16, 2010 at 12:21:25PM +0200, Remy Bohmer wrote:
>> 2010/7/16 Michael Olbrich :
>> > On Thu, Jul 15, 2010 at 03:37:52PM +0200, Remy Bohmer wrote:
>> >> 2010/7/14 Michael Olbrich :
>> >> > On Tue, Jul 13, 2010 at 10:54:09PM +0200, Remy Bohmer wrote:
>> >> >> I just pulled in the latest git and noticed that the '
>> >> >> selected_toolchain'  link becomes broken during the build.
>> >> >> Before I start ' ptxdist go' I have all ' selected_*'  links in place
>> >> >> to valid locations.
>> >> >> Then I start 'ptxdist go', which result in this error:
>> >> >>
>> >> >> Maybe this has something to do with git-commit '1d6fdce' ([ptxdist]
>> >> >> generate selected_* links in the platform dir) ???
>> >> >
>> >> > Indeed. Should be fixed now.
>> >>
>> >> Thanks. This issues seems to be fixed.
>> >> However, similar things seem to go wrong with the
>> >> selected_collectionconfig, selected_platformconfig and
>> >> selected_ptxconfig in case platformdir equals workspace.
>> >
>> > better?
>>
>> Yep, that is indeed better...
>> Question: Why is GLOBAL_LARGE_FILE always set by default? Wasn't it
>> supposed to be configurable?
>
> I'd like to avoid any unnecessary options. So far it was randomly on or of
> for various packages and I've not seen any problems. If you have a
> situation where "--enable-largefile" is a Problem, then I can make it
> optional.

No, I have no problem with it (yet)
Thanks anyway.

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] selected_toolchain link broken

2010-07-16 Thread Remy Bohmer
Hi,

2010/7/16 Michael Olbrich :
> On Thu, Jul 15, 2010 at 03:37:52PM +0200, Remy Bohmer wrote:
>> 2010/7/14 Michael Olbrich :
>> > On Tue, Jul 13, 2010 at 10:54:09PM +0200, Remy Bohmer wrote:
>> >> I just pulled in the latest git and noticed that the '
>> >> selected_toolchain'  link becomes broken during the build.
>> >> Before I start ' ptxdist go' I have all ' selected_*'  links in place
>> >> to valid locations.
>> >> Then I start 'ptxdist go', which result in this error:
>> >>
>> >> Maybe this has something to do with git-commit '1d6fdce' ([ptxdist]
>> >> generate selected_* links in the platform dir) ???
>> >
>> > Indeed. Should be fixed now.
>>
>> Thanks. This issues seems to be fixed.
>> However, similar things seem to go wrong with the
>> selected_collectionconfig, selected_platformconfig and
>> selected_ptxconfig in case platformdir equals workspace.
>
> better?

Yep, that is indeed better...
Question: Why is GLOBAL_LARGE_FILE always set by default? Wasn't it
supposed to be configurable?

Remy

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] selected_toolchain link broken

2010-07-15 Thread Remy Bohmer
Hi,

2010/7/14 Michael Olbrich :
> Hi,
>
> On Tue, Jul 13, 2010 at 10:54:09PM +0200, Remy Bohmer wrote:
>> I just pulled in the latest git and noticed that the '
>> selected_toolchain'  link becomes broken during the build.
>> Before I start ' ptxdist go' I have all ' selected_*'  links in place
>> to valid locations.
>> Then I start 'ptxdist go', which result in this error:
>>
>> Maybe this has something to do with git-commit '1d6fdce' ([ptxdist]
>> generate selected_* links in the platform dir) ???
>
> Indeed. Should be fixed now.

Thanks. This issues seems to be fixed.
However, similar things seem to go wrong with the
selected_collectionconfig, selected_platformconfig and
selected_ptxconfig in case platformdir equals workspace.

Kind regards,

Remy



>
> mol
>
> --
> 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- |
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de


  1   2   3   >