]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake.conf/cross.bbclass: Add ability to dynamically change library location
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jul 2011 12:08:58 +0000 (13:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jul 2011 14:38:31 +0000 (15:38 +0100)
Add the ability to dynamically change the library directory from "lib" to
other values. This allows the tune files to specifiy altnerative ABIs
which can be dynamically enabled by the multilib BBCLASSEXTEND code.

A variety of approaches have been attempted with this, the immediate
expansions in cross.bbclass being problematic as they are they are expanded
before the bbclass extend event hander runs. This approach ensures the
${baselib} variable is retained in the expressions resolving that complication.

Derived from some ideas from Mark Hatle.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cross.bbclass
meta/conf/bitbake.conf

index f9fd07a9a2ab421594e02134a767e94ce463a312..81358ec8dde746e031bf6388a6c193d41a251db4 100644 (file)
@@ -38,11 +38,12 @@ DEPENDS_GETTEXT = "gettext-native"
 # Path mangling needed by the cross packaging
 # Note that we use := here to ensure that libdir and includedir are
 # target paths.
-target_libdir := "${libdir}"
-target_includedir := "${includedir}"
-target_base_libdir := "${base_libdir}"
+target_base_prefix := "${base_prefix}"
 target_prefix := "${prefix}"
 target_exec_prefix := "${exec_prefix}"
+target_base_libdir = "${target_base_prefix}/${baselib}"
+target_libdir = "${target_exec_prefix}/${baselib}"
+target_includedir := "${includedir}"
 
 # Overrides for paths
 CROSS_TARGET_SYS_DIR = "${MULTIMACH_TARGET_SYS}"
index 975e24c071731618b0436725d41d0a82523c31a6..e768df5f7f6dcde4e4571f635244760a8612fee0 100644 (file)
@@ -1,6 +1,13 @@
 ##################################################################
 # Standard target filesystem paths.
 ##################################################################
+#
+# If changing these values, beware that native/cross/nativesdk bbclass 
+# files may also need changes to keep in sync.
+#
+
+# Used by multilib code to change the library paths
+baselib = "lib"
 
 # Path prefixes
 export base_prefix = ""
@@ -10,7 +17,7 @@ export exec_prefix = "/usr"
 # Base paths
 export base_bindir = "${base_prefix}/bin"
 export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/lib"
+export base_libdir = "${base_prefix}/${baselib}"
 
 # Architecture independent paths
 export datadir = "${prefix}/share"
@@ -26,13 +33,11 @@ export docdir = "${datadir}/doc"
 export bindir = "${exec_prefix}/bin"
 export sbindir = "${exec_prefix}/sbin"
 export libexecdir = "${exec_prefix}/libexec"
-export libdir = "${exec_prefix}/lib"
+export libdir = "${exec_prefix}/${baselib}"
 export includedir = "${exec_prefix}/include"
 export oldincludedir = "${exec_prefix}/include"
 
-#
-# These must match the various bbclass layout definitions
-#
+# Linkage between native/cross/nativesdk layouts
 base_bindir_native = "/bin"
 base_sbindir_native = "/sbin"
 sysconfdir_native = "/etc"