Is a there general method to segregate debugging symbols in Slackware packages?
I'm needing to know if there is a standard method for creating debug packages in Slackware. If there is, would someone please post the code here on how to do it for all packages. I want to be able to create debug packages for every package I build. I'm particularly interested in a means to replace the strip function that is commonly used in SlackBuilds.
Thank you, Xavian-Anderson Macpherson Shingoshi |
Packages have their own debug configuration options.
Don't use optimizations especially -fomit-frame-pointer. |
Not concerned with package configurations...
Quote:
Xavian-Anderson Macpherson Shingoshi |
Just a quick script to create seperate debugging tables :
Code:
#!/bin/sh |
How would this work in a SlackBuild??
Quote:
While ensuring that the files are in a package format that could be properly used. Essentially, I want to copy the way things are done with Redhat/Fedora debug packages. I'm not certain how to do this in a SlackBuild, since typically, gcc is not called directly. Is there a "make -g" that will achieve the same thing? Typically in SlackBuilds, you have to strip the symbols AFTER they are created. These are the lines of code that are used for this: This was taken from glibc.SlackBuild: # The prevailing standard seems to be putting unstripped libraries in # /usr/lib/debug/ and stripping the debugging symbols from all the other # libraries. mkdir -p $PKG/usr/lib${LIBSUFFIX}/debug cp -a $PKG/lib${LIBSUFFIX}/l*.so* $PKG/usr/lib${LIBSUFFIX}/debug cp -a $PKG/usr/lib${LIBSUFFIX}/*.a $PKG/usr/lib${LIBSUFFIX}/debug # Don't need debug+profile: ( cd $PKG/usr/lib${LIBSUFFIX}/debug ; rm -f *_p.* ) # NOTE: Is there really a reason for the glibc-debug package? # If you're debugging glibc, you can also compile it, right? ## COMMENTED OUT: There's no reason for profile libs to include -g information. ## Put back unstripped profiling libraries: #mv $PKG/usr/lib/debug/*_p.a $PKG/usr/lib # It might be best to put the unstripped and profiling libraries in glibc-debug and glibc-profile. # I don't think "strip -g" causes the pthread problems. It's --strip-unneeded that does. strip -g $PKG/lib${LIBSUFFIX}/l*.so* strip -g $PKG/usr/lib${LIBSUFFIX}/l*.so* strip -g $PKG/usr/lib${LIBSUFFIX}/lib*.a And a few lines later, this shows up: # Strip most binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null ) ## That paragraph above is commonly repeated in most of the SlackBuilds I've seen. I'm wanting to know how to create a separate package from all these files that strip is used to find and delete. Xavian-Anderson Macpherson Shingoshi |
Thought you'd be interested in this thread:
http://www.linuxquestions.org/questi...1/#post3489783 |
Gnashley, Thanks...
Quote:
Code:
[[ $EXTRA_FLAGS ]] || EXTRA_FLAGS="-g" Xavian-Anderson Macpherson Shingoshi |
Does this work as a general solution?
I've created a file in /etc/profile.d/gcc.sh.
In this file, I've put the two following lines: Code:
export CXX="/usr/bin/g++ -g -pipe" Will this fix the compilations system-wide, providing the debug symbols I want? Xavian-Anderson Macpherson Shingoshi |
All times are GMT -5. The time now is 08:52 PM. |