All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: Strip files in sysroot
@ 2015-06-19  9:09 Richard Purdie
  2015-06-23 16:13 ` Andreas Müller
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-06-19  9:09 UTC (permalink / raw)
  To: openembedded-core

Add functionality to strip binaries/libraries going into the sysroot. Whilst
this does fractionally slow down the build, it also significantly reduces the
size of the sstate cache files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 10198fd..7732e16 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -57,6 +57,101 @@ sysroot_stage_all() {
 	sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
 }
 
+python sysroot_strip () {
+    import stat, errno
+
+    dvar = d.getVar('SYSROOT_DESTDIR', True)
+    pn = d.getVar('PN', True)
+
+    os.chdir(dvar)
+
+    # Return type (bits):
+    # 0 - not elf
+    # 1 - ELF
+    # 2 - stripped
+    # 4 - executable
+    # 8 - shared library
+    # 16 - kernel module
+    def isELF(path):
+        type = 0
+        ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
+
+        if ret:
+            bb.error("split_and_strip_files: 'file %s' failed" % path)
+            return type
+
+        # Not stripped
+        if "ELF" in result:
+            type |= 1
+            if "not stripped" not in result:
+                type |= 2
+            if "executable" in result:
+                type |= 4
+            if "shared" in result:
+                type |= 8
+        return type
+
+
+    elffiles = {}
+    inodes = {}
+    libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
+    baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
+    if (d.getVar('INHIBIT_SYSROOT_STRIP', True) != '1'):
+        #
+        # First lets figure out all of the files we may have to process
+        #
+        for root, dirs, files in os.walk(dvar):
+            for f in files:
+                file = os.path.join(root, f)
+
+                try:
+                    ltarget = oe.path.realpath(file, dvar, False)
+                    s = os.lstat(ltarget)
+                except OSError as e:
+                    (err, strerror) = e.args
+                    if err != errno.ENOENT:
+                        raise
+                    # Skip broken symlinks
+                    continue
+                if not s:
+                    continue
+                # Check its an excutable
+                if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
+                        or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f):
+                    # If it's a symlink, and points to an ELF file, we capture the readlink target
+                    if os.path.islink(file):
+                        continue
+
+                    # It's a file (or hardlink), not a link
+                    # ...but is it ELF, and is it already stripped?
+                    elf_file = isELF(file)
+                    if elf_file & 1:
+                        if elf_file & 2:
+                            bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn))
+                            continue
+
+                        if s.st_ino in inodes:
+                            os.unlink(file)
+                            os.link(inodes[s.st_ino], file)
+                        else:
+                            inodes[s.st_ino] = file
+                            # break hardlink
+                            bb.utils.copyfile(file, file)
+                            elffiles[file] = elf_file
+
+        #
+        # Now strip them (in parallel)
+        #
+        strip = d.getVar("STRIP", True)
+        sfiles = []
+        for file in elffiles:
+            elf_file = int(elffiles[file])
+            #bb.note("Strip %s" % file)
+            sfiles.append((file, elf_file, strip))
+
+        oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
+}
+
 do_populate_sysroot[dirs] = "${SYSROOT_DESTDIR}"
 do_populate_sysroot[umask] = "022"
 
@@ -90,6 +185,7 @@ def sysroot_checkhashes(covered, tasknames, fnids, fns, d, invalidtasks = None):
 
 python do_populate_sysroot () {
     bb.build.exec_func("sysroot_stage_all", d)
+    bb.build.exec_func("sysroot_strip", d)
     for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
         bb.build.exec_func(f, d)
     pn = d.getVar("PN", True)
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 984362e..8ea5915 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -17,6 +17,8 @@ python __anonymous () {
 # Set this to zero if you don't want ldconfig in the output package
 USE_LDCONFIG ?= "1"
 
+INHIBIT_SYSROOT_STRIP = "1"
+
 PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
 
 # The ld.so in this glibc supports the GNU_HASH




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

* Re: [PATCH] staging: Strip files in sysroot
  2015-06-19  9:09 [PATCH] staging: Strip files in sysroot Richard Purdie
@ 2015-06-23 16:13 ` Andreas Müller
  2015-06-23 16:32   ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Müller @ 2015-06-23 16:13 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Fri, Jun 19, 2015 at 11:09 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Add functionality to strip binaries/libraries going into the sysroot. Whilst
> this does fractionally slow down the build, it also significantly reduces the
> size of the sstate cache files.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
> index 10198fd..7732e16 100644
> --- a/meta/classes/staging.bbclass
> +++ b/meta/classes/staging.bbclass
> @@ -57,6 +57,101 @@ sysroot_stage_all() {
>         sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
>  }
>
> +python sysroot_strip () {
> +    import stat, errno
> +
> +    dvar = d.getVar('SYSROOT_DESTDIR', True)
> +    pn = d.getVar('PN', True)
> +
> +    os.chdir(dvar)
> +
> +    # Return type (bits):
> +    # 0 - not elf
> +    # 1 - ELF
> +    # 2 - stripped
> +    # 4 - executable
> +    # 8 - shared library
> +    # 16 - kernel module
> +    def isELF(path):
> +        type = 0
> +        ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
> +
> +        if ret:
> +            bb.error("split_and_strip_files: 'file %s' failed" % path)
> +            return type
> +
> +        # Not stripped
> +        if "ELF" in result:
> +            type |= 1
> +            if "not stripped" not in result:
> +                type |= 2
> +            if "executable" in result:
> +                type |= 4
> +            if "shared" in result:
> +                type |= 8
> +        return type
> +
> +
> +    elffiles = {}
> +    inodes = {}
> +    libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
> +    baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
> +    if (d.getVar('INHIBIT_SYSROOT_STRIP', True) != '1'):
> +        #
> +        # First lets figure out all of the files we may have to process
> +        #
> +        for root, dirs, files in os.walk(dvar):
> +            for f in files:
> +                file = os.path.join(root, f)
> +
> +                try:
> +                    ltarget = oe.path.realpath(file, dvar, False)
> +                    s = os.lstat(ltarget)
> +                except OSError as e:
> +                    (err, strerror) = e.args
> +                    if err != errno.ENOENT:
> +                        raise
> +                    # Skip broken symlinks
> +                    continue
> +                if not s:
> +                    continue
> +                # Check its an excutable
> +                if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
> +                        or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f):
> +                    # If it's a symlink, and points to an ELF file, we capture the readlink target
> +                    if os.path.islink(file):
> +                        continue
> +
> +                    # It's a file (or hardlink), not a link
> +                    # ...but is it ELF, and is it already stripped?
> +                    elf_file = isELF(file)
> +                    if elf_file & 1:
> +                        if elf_file & 2:
> +                            bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn))
> +                            continue
> +
> +                        if s.st_ino in inodes:
> +                            os.unlink(file)
> +                            os.link(inodes[s.st_ino], file)
> +                        else:
> +                            inodes[s.st_ino] = file
> +                            # break hardlink
> +                            bb.utils.copyfile(file, file)
> +                            elffiles[file] = elf_file
> +
> +        #
> +        # Now strip them (in parallel)
> +        #
> +        strip = d.getVar("STRIP", True)
> +        sfiles = []
> +        for file in elffiles:
> +            elf_file = int(elffiles[file])
> +            #bb.note("Strip %s" % file)
> +            sfiles.append((file, elf_file, strip))
> +
> +        oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
> +}
> +
>  do_populate_sysroot[dirs] = "${SYSROOT_DESTDIR}"
>  do_populate_sysroot[umask] = "022"
>
> @@ -90,6 +185,7 @@ def sysroot_checkhashes(covered, tasknames, fnids, fns, d, invalidtasks = None):
>
>  python do_populate_sysroot () {
>      bb.build.exec_func("sysroot_stage_all", d)
> +    bb.build.exec_func("sysroot_strip", d)
>      for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
>          bb.build.exec_func(f, d)
>      pn = d.getVar("PN", True)
> diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
> index 984362e..8ea5915 100644
> --- a/meta/recipes-core/glibc/glibc-package.inc
> +++ b/meta/recipes-core/glibc/glibc-package.inc
> @@ -17,6 +17,8 @@ python __anonymous () {
>  # Set this to zero if you don't want ldconfig in the output package
>  USE_LDCONFIG ?= "1"
>
> +INHIBIT_SYSROOT_STRIP = "1"
> +
>  PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
>
>  # The ld.so in this glibc supports the GNU_HASH
>
Do I understand this right: Stripping is disabled by default (because
it would cause trouble for remote debugging)?

Andreas


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

* Re: [PATCH] staging: Strip files in sysroot
  2015-06-23 16:13 ` Andreas Müller
@ 2015-06-23 16:32   ` Richard Purdie
  2015-06-23 18:19     ` Andreas Müller
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-06-23 16:32 UTC (permalink / raw)
  To: Andreas Müller; +Cc: openembedded-core

On Tue, 2015-06-23 at 18:13 +0200, Andreas Müller wrote:
> On Fri, Jun 19, 2015 at 11:09 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Add functionality to strip binaries/libraries going into the sysroot. Whilst
> > this does fractionally slow down the build, it also significantly reduces the
> > size of the sstate cache files.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> >
> > diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
> > index 10198fd..7732e16 100644
> > --- a/meta/classes/staging.bbclass
> > +++ b/meta/classes/staging.bbclass
> > @@ -57,6 +57,101 @@ sysroot_stage_all() {
> >         sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
> >  }
> >
> > +python sysroot_strip () {
> > +    import stat, errno
> > +
> > +    dvar = d.getVar('SYSROOT_DESTDIR', True)
> > +    pn = d.getVar('PN', True)
> > +
> > +    os.chdir(dvar)
> > +
> > +    # Return type (bits):
> > +    # 0 - not elf
> > +    # 1 - ELF
> > +    # 2 - stripped
> > +    # 4 - executable
> > +    # 8 - shared library
> > +    # 16 - kernel module
> > +    def isELF(path):
> > +        type = 0
> > +        ret, result = oe.utils.getstatusoutput("file \"%s\"" % path.replace("\"", "\\\""))
> > +
> > +        if ret:
> > +            bb.error("split_and_strip_files: 'file %s' failed" % path)
> > +            return type
> > +
> > +        # Not stripped
> > +        if "ELF" in result:
> > +            type |= 1
> > +            if "not stripped" not in result:
> > +                type |= 2
> > +            if "executable" in result:
> > +                type |= 4
> > +            if "shared" in result:
> > +                type |= 8
> > +        return type
> > +
> > +
> > +    elffiles = {}
> > +    inodes = {}
> > +    libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
> > +    baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
> > +    if (d.getVar('INHIBIT_SYSROOT_STRIP', True) != '1'):
> > +        #
> > +        # First lets figure out all of the files we may have to process
> > +        #
> > +        for root, dirs, files in os.walk(dvar):
> > +            for f in files:
> > +                file = os.path.join(root, f)
> > +
> > +                try:
> > +                    ltarget = oe.path.realpath(file, dvar, False)
> > +                    s = os.lstat(ltarget)
> > +                except OSError as e:
> > +                    (err, strerror) = e.args
> > +                    if err != errno.ENOENT:
> > +                        raise
> > +                    # Skip broken symlinks
> > +                    continue
> > +                if not s:
> > +                    continue
> > +                # Check its an excutable
> > +                if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
> > +                        or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f):
> > +                    # If it's a symlink, and points to an ELF file, we capture the readlink target
> > +                    if os.path.islink(file):
> > +                        continue
> > +
> > +                    # It's a file (or hardlink), not a link
> > +                    # ...but is it ELF, and is it already stripped?
> > +                    elf_file = isELF(file)
> > +                    if elf_file & 1:
> > +                        if elf_file & 2:
> > +                            bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn))
> > +                            continue
> > +
> > +                        if s.st_ino in inodes:
> > +                            os.unlink(file)
> > +                            os.link(inodes[s.st_ino], file)
> > +                        else:
> > +                            inodes[s.st_ino] = file
> > +                            # break hardlink
> > +                            bb.utils.copyfile(file, file)
> > +                            elffiles[file] = elf_file
> > +
> > +        #
> > +        # Now strip them (in parallel)
> > +        #
> > +        strip = d.getVar("STRIP", True)
> > +        sfiles = []
> > +        for file in elffiles:
> > +            elf_file = int(elffiles[file])
> > +            #bb.note("Strip %s" % file)
> > +            sfiles.append((file, elf_file, strip))
> > +
> > +        oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
> > +}
> > +
> >  do_populate_sysroot[dirs] = "${SYSROOT_DESTDIR}"
> >  do_populate_sysroot[umask] = "022"
> >
> > @@ -90,6 +185,7 @@ def sysroot_checkhashes(covered, tasknames, fnids, fns, d, invalidtasks = None):
> >
> >  python do_populate_sysroot () {
> >      bb.build.exec_func("sysroot_stage_all", d)
> > +    bb.build.exec_func("sysroot_strip", d)
> >      for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
> >          bb.build.exec_func(f, d)
> >      pn = d.getVar("PN", True)
> > diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
> > index 984362e..8ea5915 100644
> > --- a/meta/recipes-core/glibc/glibc-package.inc
> > +++ b/meta/recipes-core/glibc/glibc-package.inc
> > @@ -17,6 +17,8 @@ python __anonymous () {
> >  # Set this to zero if you don't want ldconfig in the output package
> >  USE_LDCONFIG ?= "1"
> >
> > +INHIBIT_SYSROOT_STRIP = "1"
> > +
> >  PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
> >
> >  # The ld.so in this glibc supports the GNU_HASH
> >
> Do I understand this right: Stripping is disabled by default (because
> it would cause trouble for remote debugging)?

No, this is only stripping of the sysroot files, not target. Its due to
the way locale packaging happens for glibc. It does mean some files in
the sysroot are not stripped when they could be but its no change from
the existing behaviour before the patch.

Cheers,

Richard






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

* Re: [PATCH] staging: Strip files in sysroot
  2015-06-23 16:32   ` Richard Purdie
@ 2015-06-23 18:19     ` Andreas Müller
  2015-06-23 21:48       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Müller @ 2015-06-23 18:19 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Tue, Jun 23, 2015 at 6:32 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>> Do I understand this right: Stripping is disabled by default (because
>> it would cause trouble for remote debugging)?
>
> No, this is only stripping of the sysroot files, not target. Its due to
> the way locale packaging happens for glibc. It does mean some files in
> the sysroot are not stripped when they could be but its no change from
> the existing behaviour before the patch.
>
> Cheers,
>
> Richard
>
Sorry for insisting - maybe I need more explanation:

From my understanding staging sequence is:

* do_install installs to recipe's image folder
* do_populate_sysroot -> sysroot_stage_all() creates hardlinks to
recipe's sysroot-destdir folder
* do_populate_sysroot -> sysroot_strip() strips files in recipe's
sysroot-destdir (=files in recipe's image folder)
* through sstate_install the files are hard linked to MACHINE's
sysroot (STAGING_DIR_HOST)

I see two issues activating stripping

1. If do_package starts after stripping only stripped packages are
packed also for dbg. I think nothing gaurantees that packaging occurs
before do_populate_sysroot.
2. When remote debugging I tell debugger: set sysroot <content of
STAGING_DIR_HOST>. Where do I find a unstripped sysroot now?

Andreas


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

* Re: [PATCH] staging: Strip files in sysroot
  2015-06-23 18:19     ` Andreas Müller
@ 2015-06-23 21:48       ` Richard Purdie
  2015-06-24  6:56         ` Andreas Müller
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-06-23 21:48 UTC (permalink / raw)
  To: Andreas Müller; +Cc: openembedded-core

On Tue, 2015-06-23 at 20:19 +0200, Andreas Müller wrote:
> On Tue, Jun 23, 2015 at 6:32 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >> Do I understand this right: Stripping is disabled by default (because
> >> it would cause trouble for remote debugging)?
> >
> > No, this is only stripping of the sysroot files, not target. Its due to
> > the way locale packaging happens for glibc. It does mean some files in
> > the sysroot are not stripped when they could be but its no change from
> > the existing behaviour before the patch.
> >
> > Cheers,
> >
> > Richard
> >
> Sorry for insisting - maybe I need more explanation:
> 
> From my understanding staging sequence is:
> 
> * do_install installs to recipe's image folder
> * do_populate_sysroot -> sysroot_stage_all() creates hardlinks to
> recipe's sysroot-destdir folder
> * do_populate_sysroot -> sysroot_strip() strips files in recipe's
> sysroot-destdir (=files in recipe's image folder)

When it strips files, the hardlink is broken and replaced with a
stripped copy.

> * through sstate_install the files are hard linked to MACHINE's
> sysroot (STAGING_DIR_HOST)
> 
> I see two issues activating stripping
> 
> 1. If do_package starts after stripping only stripped packages are
> packed also for dbg. I think nothing gaurantees that packaging occurs
> before do_populate_sysroot.

Nothing does but the copy in image remains unstripped as above.

> 2. When remote debugging I tell debugger: set sysroot <content of
> STAGING_DIR_HOST>. Where do I find a unstripped sysroot now?

That is not really the way the sysroot has been intended to be used.
Inhibiting the sysroot stripping for target files would seem to be the
best thing to do if you do wish to use the sysroot that way:

INHIBIT_SYSROOT_STRIP_class-target = "1"

Cheers,

Richard



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

* Re: [PATCH] staging: Strip files in sysroot
  2015-06-23 21:48       ` Richard Purdie
@ 2015-06-24  6:56         ` Andreas Müller
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Müller @ 2015-06-24  6:56 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Tue, Jun 23, 2015 at 11:48 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2015-06-23 at 20:19 +0200, Andreas Müller wrote:
>> On Tue, Jun 23, 2015 at 6:32 PM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> >> Do I understand this right: Stripping is disabled by default (because
>> >> it would cause trouble for remote debugging)?
>> >
>> > No, this is only stripping of the sysroot files, not target. Its due to
>> > the way locale packaging happens for glibc. It does mean some files in
>> > the sysroot are not stripped when they could be but its no change from
>> > the existing behaviour before the patch.
>> >
>> > Cheers,
>> >
>> > Richard
>> >
>> Sorry for insisting - maybe I need more explanation:
>>
>> From my understanding staging sequence is:
>>
>> * do_install installs to recipe's image folder
>> * do_populate_sysroot -> sysroot_stage_all() creates hardlinks to
>> recipe's sysroot-destdir folder
>> * do_populate_sysroot -> sysroot_strip() strips files in recipe's
>> sysroot-destdir (=files in recipe's image folder)
>
> When it strips files, the hardlink is broken and replaced with a
> stripped copy.
>
>> * through sstate_install the files are hard linked to MACHINE's
>> sysroot (STAGING_DIR_HOST)
>>
>> I see two issues activating stripping
>>
>> 1. If do_package starts after stripping only stripped packages are
>> packed also for dbg. I think nothing gaurantees that packaging occurs
>> before do_populate_sysroot.
>
> Nothing does but the copy in image remains unstripped as above.
>
>> 2. When remote debugging I tell debugger: set sysroot <content of
>> STAGING_DIR_HOST>. Where do I find a unstripped sysroot now?
>
> That is not really the way the sysroot has been intended to be used.
> Inhibiting the sysroot stripping for target files would seem to be the
> best thing to do if you do wish to use the sysroot that way:
>
> INHIBIT_SYSROOT_STRIP_class-target = "1"
>
> Cheers,
>
Breaking hardlinks by stripping explains why there is no trouble to
expect. Thanks for explanation. I'll set INHIBIT_SYSROOT_STRIP = "1"
in my local.conf and am fine with spontaneous remote debugging.

Off topic: I have a class in meta-qt5-extra aligning paths in cmake
files. Because I am interested in keeping packed cmake files
unaligned, alignment is done only in local sysroot. To avoid trouble I
also break hardlinks (line 173).

This class is used for a while for all this kde/hawaii/lxqt stuff but
at least meta-qt5 has recipes where this class could be useful.

I saw there is an update for cmake pending. After consolidating from
this update: Would cmake-lib.bbclass have a chance in oe-core?

Andreas

[1] https://github.com/schnitzeltony/meta-qt5-extra/blob/master/classes/cmake-lib.bbclass


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

end of thread, other threads:[~2015-06-24  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19  9:09 [PATCH] staging: Strip files in sysroot Richard Purdie
2015-06-23 16:13 ` Andreas Müller
2015-06-23 16:32   ` Richard Purdie
2015-06-23 18:19     ` Andreas Müller
2015-06-23 21:48       ` Richard Purdie
2015-06-24  6:56         ` Andreas Müller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.