google-breakpad: new package
v4 cover google-breakpad: new package
Changes v3 -> v4
Fixed minor issue in google-breakpad_gen-syms.sh
Had to remove -print from find command
Changes v2 -> v3 (All suggested by thomas.petazzoni at free-electrons.com)
Removed dependency of BR2_ENABLE_DEBUG, but added comment,
that this flag might have to be set in order to use breakpad properly.
Removed "find -name ..." for libs and binaries by generic patterns,
such as "*.so" and so forth. This will never work properly. Instead I added a list to insert libs and binaries, that will be symbol- dumped and prepared for breakpad (see Config.in patch v3 2/2)
Changed storage path for dumps from: $(TARGET_DIR).. to
$(STAGING_DIR)/usr/share/google-breakpad-symbols/
Removed most logic from Makefile. Added script instead, which is
called by Makefile
Added dependency for compatible targets: ARM, i386, MIPS... Set fixed version for checkout (instead of head)
Fixed typos, and some minor mistakes
Changes v1 -> v2 (All suggested by maxime.hadjinlian at gmail.com)
Added dependency from BR2_ENABLE_DEBUG
Removed symbolstore.py -> Its all done in Makefile now Removed new Target -> It in target-finalize before stripping now Added LICENSE and LICENSE_FILE to *.mk
Pascal Huerst (2):
google-breakpad: new package
google-breakpad: integration into makefile and Config.in
Config.in | 10 ++++++ Makefile | 7 ++++ package/Config.in | 2 ++ package/google-breakpad/Config.in | 21 ++++++++++++ .../google-breakpad/google-breakpad-gen-syms.sh | 37 ++++++++++++++++++++++ package/google-breakpad/google-breakpad.mk | 17 ++++++++++ 6 files changed, 94 insertions(+) create mode 100644 package/google-breakpad/Config.in create mode 100755 package/google-breakpad/google-breakpad-gen-syms.sh create mode 100644 package/google-breakpad/google-breakpad.mk
Signature · 1 line
1.9.3
PATCH v4 1/2 google-breakpad: new package
Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact "minidump" files, send them back to your server, and produce C and C++ stack traces from these minidumps. Breakpad can also write minidumps on request for programs that have not crashed.
--- package/Config.in | 1 + package/google-breakpad/Config.in | 21 ++++++++++++ .../google-breakpad/google-breakpad-gen-syms.sh | 37 ++++++++++++++++++++++ package/google-breakpad/google-breakpad.mk | 17 ++++++++++ 4 files changed, 76 insertions(+) create mode 100644 package/google-breakpad/Config.in create mode 100755 package/google-breakpad/google-breakpad-gen-syms.sh create mode 100644 package/google-breakpad/google-breakpad.mk
package/Config.in +1 -0
@@ -54,6 +54,7 @@ source "package/dstat/Config.in" source "package/duma/Config.in" source "package/fio/Config.in" source "package/gdb/Config.in" +source "package/google-breakpad/Config.in" source "package/iozone/Config.in" source "package/kexec/Config.in" source "package/ktap/Config.in"
package/google-breakpad/Config.in new file +21 -0
@@ -0,0 +1,21 @@ +config BR2_PACKAGE_GOOGLE_BREAKPAD + bool "google-breakpad" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_aarch64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + + help + Google-Breakpad is a library and tool suite that allows you to distribute + an application to users with compiler-provided debugging information + removed, record crashes in compact "minidump" files, send them back to + your server, and produce C and C++ stack traces from these minidumps. + Breakpad can also write minidumps on request for programs that have not + crashed. + + Add all binaries and libraries you want to debug by google-breakpad to + BR2_GOOGLE_BREAKPAD_INCLUDE_FILES + + http://code.google.com/p/google-breakpad/ + +comment "google-breakpad requires an (e)glibc toolchain w/ C++ enabled" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_USES_GLIBC)
package/google-breakpad/google-breakpad-gen-syms.sh new file +37 -0
@@ -0,0 +1,37 @@ +#!/bin/sh + +STAGING_DIR=$1 +HOST_DIR=$2 +INCLUDE_FILES=$3 + +# Search for files we want to dump symbols of +FIND_CMD="find $STAGING_DIR -name \"\"" + +for INCLUDE_FILE in $INCLUDE_FILES; do + FIND_CMD="$FIND_CMD -o -name \"$INCLUDE_FILE\"" +done + +# Create directory structure +SYMBOLS_DIR=$STAGING_DIR/usr/share/google-breakpad-symbols + +mkdir -p $SYMBOLS_DIR/tmp + +for BIN_PATH in $(eval $FIND_CMD); do + BIN=$(basename $BIN_PATH); + SYM=$BIN.sym; + + $HOST_DIR/usr/bin/dump_syms $BIN_PATH > $SYMBOLS_DIR/tmp/$SYM 2>/dev/null; + + if [ $? -eq 0 ]; then + HASH=$(head -n1 $SYMBOLS_DIR/tmp/$SYM | cut -d ' ' -f 4); + mkdir -p $SYMBOLS_DIR/$BIN/$HASH + mv $SYMBOLS_DIR/tmp/$SYM $SYMBOLS_DIR/$BIN/$HASH; + else + rm -f $SYMBOLS_DIR/tmp/$SYM + echo "Can not dump symbols of $BIN for google-breakpad!" + fi +done + +rm -Rf $SYMBOLS_DIR/tmp + +exit 0
package/google-breakpad/google-breakpad.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# google-breakpad +# +################################################################################ + +GOOGLE_BREAKPAD_VERSION = 1320 +GOOGLE_BREAKPAD_SITE = http://google-breakpad.googlecode.com/svn/trunk +GOOGLE_BREAKPAD_SITE_METHOD = svn +GOOGLE_BREAKPAD_CONF_OPT = --disable-processor --disable-tools +GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad +GOOGLE_BREAKPAD_INSTALL_STAGING = YES +GOOGLE_BREAKPAD_LICENSE = BSD-3c +GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE + +$(eval $(host-autotools-package)) +$(eval $(autotools-package))
Signature · 1 line
1.9.3
PATCH v4 1/2 google-breakpad: new package
Pascal, All,
Some comments below...
On 2014-06-04 13:32 +0200, Pascal Huerst spake thusly:
Quoted 35 lines
Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact "minidump" files, send them back to your server, and produce C and C++ stack traces from these minidumps. Breakpad can also write minidumps on request for programs that have not crashed.
Signed-off-by Pascal Huerst <[email protected]>--- package/Config.in | 1 + package/google-breakpad/Config.in | 21 ++++++++++++ .../google-breakpad/google-breakpad-gen-syms.sh | 37 ++++++++++++++++++++++ package/google-breakpad/google-breakpad.mk | 17 ++++++++++ 4 files changed, 76 insertions(+) create mode 100644 package/google-breakpad/Config.in create mode 100755 package/google-breakpad/google-breakpad-gen-syms.sh create mode 100644 package/google-breakpad/google-breakpad.mkpackage/Config.in +1
-0@@ -54,6 +54,7 @@ source "package/dstat/Config.in" source "package/duma/Config.in" source "package/fio/Config.in" source "package/gdb/Config.in" +source "package/google-breakpad/Config.in" source "package/iozone/Config.in" source "package/kexec/Config.in" source "package/ktap/Config.in"package/google-breakpad/Config.in new file +0
-0
package/google-breakpad/Config.in line 6
Quoted 6 lines
package/google-breakpad/Config.in new file +6
-0@@ -0,0 +1,21 @@ +config BR2_PACKAGE_GOOGLE_BREAKPAD + bool "google-breakpad" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_aarch64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el +
No empty line here.
package/google-breakpad/Config.in line 16
Quoted 10 lines
package/google-breakpad/Config.in new file +10
-0+ help + Google-Breakpad is a library and tool suite that allows you to distribute + an application to users with compiler-provided debugging information + removed, record crashes in compact "minidump" files, send them back to + your server, and produce C and C++ stack traces from these minidumps. + Breakpad can also write minidumps on request for programs that have not + crashed. + + Add all binaries and libraries you want to debug by google-breakpad to + BR2_GOOGLE_BREAKPAD_INCLUDE_FILES
These two lines should have been part of the following patch, since you introduce that variable only then.
package/google-breakpad/google-breakpad-gen-syms.sh
Quoted 9 lines
package/google-breakpad/Config.in new file +4
-0+ http://code.google.com/p/google-breakpad/ + +comment "google-breakpad requires an (e)glibc toolchain w/ C++ enabled" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_USES_GLIBC)package/google-breakpad/google-breakpad-gen-syms.sh new file +0
-0
This script should have been part of your next patch.
package/google-breakpad/google-breakpad-gen-syms.sh line 4
Quoted 5 lines
package/google-breakpad/google-breakpad-gen-syms.sh new file +4
-0@@ -0,0 +1,37 @@ +#!/bin/sh + +STAGING_DIR=$1 +HOST_DIR=$2
Passing HOST_DIR is not needed. You should call the script with the EXTRA_ENV which contains the PATH variable, in the Makefile:
$(EXTRA_ENV) your-script your-args
package/google-breakpad/google-breakpad-gen-syms.sh line 8
Quoted 4 lines
package/google-breakpad/google-breakpad-gen-syms.sh new file +4
-0+INCLUDE_FILES=$3 + +# Search for files we want to dump symbols of +FIND_CMD="find $STAGING_DIR -name \"\""
Ugly hack. It took me a moment to understand what you wanted. See below for a suggested better way to achieve the same result.
Besides, not all package install their files in staging. You should use TARGET_DIR instead.
package/google-breakpad/google-breakpad-gen-syms.sh line 12
Quoted 3 lines
package/google-breakpad/google-breakpad-gen-syms.sh new file +3
-0+for INCLUDE_FILE in $INCLUDE_FILES; do + FIND_CMD="$FIND_CMD -o -name \"$INCLUDE_FILE\"" +done
This does not handle the case where two files would have the same basename but reside in different directories. For example:
/usr/bin/my-exec <- ELF file
/data/config/my-exec <- database
Please state that INCLUDE_FILES should be relative to $(TARGET_DIR). That way, we guarantee breakpad is not run against unwanted files, which would otherwise confuse the unsuspecting user.
Quoted 14 lines
package/google-breakpad/google-breakpad-gen-syms.sh new file +14
-0+# Create directory structure +SYMBOLS_DIR=$STAGING_DIR/usr/share/google-breakpad-symbols + +mkdir -p $SYMBOLS_DIR/tmp + +for BIN_PATH in $(eval $FIND_CMD); do + BIN=$(basename $BIN_PATH); + SYM=$BIN.sym; + + $HOST_DIR/usr/bin/dump_syms $BIN_PATH > $SYMBOLS_DIR/tmp/$SYM 2>/dev/null; + + if [ $? -eq 0 ]; then + HASH=$(head -n1 $SYMBOLS_DIR/tmp/$SYM | cut -d ' ' -f 4); + mkdir -p $SYMBOLS_DIR/$BIN/$HASH
package/google-breakpad/google-breakpad-gen-syms.sh line 37
Quoted 10 lines
package/google-breakpad/google-breakpad-gen-syms.sh new file +10
-0+ mv $SYMBOLS_DIR/tmp/$SYM $SYMBOLS_DIR/$BIN/$HASH; + else + rm -f $SYMBOLS_DIR/tmp/$SYM + echo "Can not dump symbols of $BIN for google-breakpad!" + fi +done + +rm -Rf $SYMBOLS_DIR/tmp + +exit 0
'exit 0' is not needed.
What about the following (untested)?
#!/bin/sh
STAGING_DIR="${1}"
TARGET_DIR="${2}"
shift 2
symbols_dir="${STAGING_DIR}/usr/share/google-breakpad-symbols"
rm -rf "${symbols_dir}"
mkdir -p "${symbols_dir}/tmp"
cd "${TARGET_DIR}"
for file in $(ls -1d "${@}"); do
if [ -d "${file}" ]; then
printf "Error: '%s' is a directory\n" "${file}" >&2
exit 1
fi
if dump_syms "${file}" >"${symbols_dir}/tmp/tmp.syms"; then
sha1="$( printf "%s" "${file}" |sha1sum |awk '{print $1}' )"
mv "${symbols_dir}/tmp/tmp.syms" "${symbols_dir}/${sha1}.sym"
printf "%s %s\n" "${sha1}" "${file}" >>"${symbols_dir}/hashes.list"
else
printf "Error dumping symbols for: '%s'\n" "${file}" >&2
exit 1
fi
done
rm -rf "${symbols_dir}/tmp"It is more concise, and handles mutilple files with the same name, and packages which do not install their files in STAGING_DIR.
${1} and ${2} are the staging and target dirs, so we store them and shift, so the remaining arguments are all the paths to files we want to extract symbols from.
We $(ls -1d) the args, in case one of them is a glob.
A directory argument is invalid. The user should use a glob.
We can use 'dump_syms' without full path since it is guaranteed to be in the PATH, as exported by the EXTRA_ENV variable used above.
We store the symbols in a file named after the sha1 of the filename. We could use the symbols file's hash if it is a strong enough hash (eg sha1 or above, but since I don;t know what hash dump_syms generates, I can't trust it to not collide). This allows to store symbols for file with the same name in different directories.
We store the correspondence {sha1,file} in a text file, so it is easy to retrieve the filename from a sha1, and conversely.
We exit as soon as we can't extract symbols from a file, as we want to catch it as a failure, instead of ignoring it.
But this script should go in the second patch of yours in any case.
Quoted 6 lines
package/google-breakpad/google-breakpad.mk new file +0
-0
package/google-breakpad/google-breakpad.mk line 10
Quoted 10 lines
package/google-breakpad/google-breakpad.mk new file +10
-0@@ -0,0 +1,17 @@ +################################################################################ +# +# google-breakpad +# +################################################################################ + +GOOGLE_BREAKPAD_VERSION = 1320 +GOOGLE_BREAKPAD_SITE = http://google-breakpad.googlecode.com/svn/trunk +GOOGLE_BREAKPAD_SITE_METHOD = svn +GOOGLE_BREAKPAD_CONF_OPT = --disable-processor --disable-tools
Do we really want to disable tools even for the host variant? Isn't dump_symc a tool that gets disabled in this case?
package/google-breakpad/google-breakpad.mk line 11
Quoted 1 line
package/google-breakpad/google-breakpad.mk new file +1
-0+GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad
Does the target variant have a build-time dependency on the host tools?
If not, then you should do, in Config.in:
config BR2_PACKAGE_GOOGLE_BREAKPAD
bool "google breakpad"
select BR2_PACKAGE_HOST_GOOGLE_BREAKPAD
config BR2_PACKAGE_HOST_GOOGLE_BREAKPAD
bool
(with the other depends you need, of course.)
Regards,
Yann E. MORIN.
Quoted 13 lines
package/google-breakpad/google-breakpad.mk new file +6
-0+GOOGLE_BREAKPAD_INSTALL_STAGING = YES +GOOGLE_BREAKPAD_LICENSE = BSD-3c +GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE + +$(eval $(host-autotools-package)) +$(eval $(autotools-package))Signature · 6 lines
1.9.3 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 1/2 google-breakpad: new package
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Yann, all,
[snip]
Quoted 14 lines
Quoted 4 lines
(quoted diff) +0
-0
b/package/google-breakpad/google-breakpad-gen-syms.shnew file mode 100755 index 0000000..e082875 ---/dev/null+++b/package/google-breakpad/google-breakpad-gen-syms.shThis script should have been part of your next patch.
Review +#!/bin/sh + +STAGING_DIR=$1 +HOST_DIR=$2
Quoted 1 line
(quoted diff) +0
-0@@ -0,0 +1,37 @@ +#!/bin/sh + +STAGING_DIR=$1 +HOST_DIR=$2Passing
HOST_DIRis not needed. You should call the script with theEXTRA_ENVwhich contains the PATH variable, in theMakefile:$(EXTRA_ENV) your-script your-args
Quoted 8 lines
Quoted 2 lines
(quoted diff) +1
-0+INCLUDE_FILES=$3 + +# Search for files we want to dump symbolsof +FIND_CMD="find $STAGING_DIR -name \"\""
Ugly hack. It took me a moment to understand what you wanted. See below for a suggested better way to achieve the same result.
Besides, not all package install their files in staging. You should use
TARGET_DIRinstead.
Aren't all binaries in TARGET_DIR stripped? If so, it doesn't really make sense to run gen_syms in TARGET_DIR.
Quoted 67 lines
Review
Quoted 2 lines
(quoted diff) +1
-1+for INCLUDE_FILE in $INCLUDE_FILES; do + FIND_CMD="$FIND_CMD -o -name \"$INCLUDE_FILE\"" +doneThis does not handle the case where two files would have the same basename but reside in different directories. For example:
/usr/bin/my-exec<- ELF file /data/config/my-exec <-
databasePlease state that
INCLUDE_FILESshould be relative to $(TARGET_DIR). That way, we guarantee breakpad is not run against unwanted files, which would otherwise confuse the unsuspecting user.Quoted 11 lines
(quoted diff) +3
-0+# Create directory structure +SYMBOLS_DIR=$STAGING_DIR/usr/share/google-breakpad-symbols + +mkdir -p $SYMBOLS_DIR/tmp + +for BIN_PATH in $(eval $FIND_CMD);do + BIN=$(basename $BIN_PATH); + SYM=$BIN.sym; + +
$HOST_DIR/usr/bin/dump_syms $BIN_PATH > $SYMBOLS_DIR/tmp/$SYM
2>/dev/null; + + if [ $? -eq 0 ]; then + HASH=$(head -n1
$SYMBOLS_DIR/tmp/$SYM | cut -d ' ' -f 4); + mkdir -p
$SYMBOLS_DIR/$BIN/$HASH + mv $SYMBOLS_DIR/tmp/$SYM
$SYMBOLS_DIR/$BIN/$HASH; + else + rm -f $SYMBOLS_DIR/tmp/$SYM +
echo "Can not dump symbols of $BIN for google-breakpad!" + fi
+done + +rm -Rf $SYMBOLS_DIR/tmp + +exit 0'exit 0' is not needed.
What about the following (untested)?
#!/bin/sh STAGING_DIR="${1}" TARGET_DIR="${2}" shift 2
symbols_dir="${STAGING_DIR}/usr/share/google-breakpad-symbols" rm -rf "${symbols_dir}" mkdir -p "${symbols_dir}/tmp"
cd "${TARGET_DIR}" for file in $(ls -1d "${@}"); do if [ -d "${file}" ]; then printf "Error: '%s' is a directory\n" "${file}"
Quoted 3 lines
&2 exit 1 fi if
dump_syms"${file}" "${symbols_dir}/tmp/tmp.syms"; then sha1="$( printf "%s" "${file}"|sha1sum |awk '{print $1}' )" mv "${symbols_dir}/tmp/tmp.syms" "${symbols_dir}/${sha1}.sym" printf "%s %s\n" "${sha1}" "${file}"
Quoted 2 lines
Quoted 2 lines
"${symbols_dir}/hashes.list" else printf "Error dumping symbols
for: '%s'\n" "${file}" >&2 exit 1 fi done rm -rf
"${symbols_dir}/tmp"It is more concise, and handles mutilple files with the same name, and packages which do not install their files in
STAGING_DIR.${1} and ${2} are the staging and target dirs, so we store them and shift, so the remaining arguments are all the paths to files we want to extract symbols from.
We $(ls -1d) the args, in case one of them is a glob.
A directory argument is invalid. The user should use a glob.
We can use '
dump_syms' without full path since it is guaranteed to be in the PATH, as exported by theEXTRA_ENVvariable used above.We store the symbols in a file named after the sha1 of the filename. We could use the symbols file's hash if it is a strong enough hash (eg sha1 or above, but since I don;t know what hash
dump_symsgenerates, I can't trust it to not collide). This allows to store symbols for file with the same name in different directories.
Quoted 5 lines
We store the correspondence {sha1,file} in a text file, so it is easy to retrieve the filename from a sha1, and conversely.
We exit as soon as we can't extract symbols from a file, as we want to catch it as a failure, instead of ignoring it.
Ok, I understand your concerns and the find-call is by far not perfect, but the whole reason why I setup the directory structure that way, is because googles minidump-stackwalk expects it that way. See:
[snip]
regards
pascal
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEUEARECAAYFAlOQ0VgACgkQo7eFcXQQ8U0B0QCfQbjF0nqWHLOcwr4AyiXLXDeL BOIAl3P1IpV/hcSaXIEZpguemMN+RgU=
=apjR
-----END PGP SIGNATURE-----
PATCH v4 1/2 google-breakpad: new package
Pascal, All,
On 2014-06-05 22:21 +0200, Pascal H?rst spake thusly:
Quoted 5 lines
Quoted 2 lines
Besides, not all package install their files in staging. You should use
TARGET_DIRinstead.Aren't all binaries in
TARGET_DIRstripped? If so, it doesn't really make sense to rungen_symsinTARGET_DIR.
They are stripped only just before making the filesystem images. So, if you run your script before that, you'll get unstripped binaries in the target/ dir.
[--SNIP alternate script proposal--]
Quoted 4 lines
Ok, I understand your concerns and the find-call is by far not perfect, but the whole reason why I setup the directory structure that way, is because googles minidump-stackwalk expects it that way. See:
https://code.google.com/p/google-breakpad/wiki/LinuxStarterGuide#Producing_symbols_for_your_application
OK (I was afraid that layout was indeed a requirement). You can keep the layout as you created it. Just adapt my script so it generates the proper layout.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 1/2 google-breakpad: new package
In reply to Pascal HuerstPascal, all,
On Wed, Jun 4, 2014 at 1:32 PM, Pascal Huerst <[email protected]> wrote:
[...]
Quoted 6 lines
package/google-breakpad/google-breakpad.mk new file +6
-0+################################################################################ +# +# google-breakpad +# +################################################################################ +
package/google-breakpad/google-breakpad.mk line 16
Quoted 10 lines
package/google-breakpad/google-breakpad.mk new file +10
-0+GOOGLE_BREAKPAD_VERSION = 1320 +GOOGLE_BREAKPAD_SITE = http://google-breakpad.googlecode.com/svn/trunk +GOOGLE_BREAKPAD_SITE_METHOD = svn +GOOGLE_BREAKPAD_CONF_OPT = --disable-processor --disable-tools +GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad +GOOGLE_BREAKPAD_INSTALL_STAGING = YES +GOOGLE_BREAKPAD_LICENSE = BSD-3c +GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE + +$(eval $(host-autotools-package))
Unfortunately, among the built host-tools, minidump-2-core is not a cross-tool :-( (see [1]), so it might be worthwhile to not installed it.
Quoted 8 lines
+$(eval $(autotools-package))
--
1.9.3_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
Signature · 1 line
Samuel
PATCH v4 2/2 google-breakpad: integration into makefile and Config.in
In reply to Pascal HuerstThis adds the symbol generation for google-breakpad to the Makefile and adds a list were users can insert libraries and binaries that should be symbol-dumped.
--- Config.in | 10 ++++++++++ Makefile | 7 +++++++ package/Config.in | 1 + 3 files changed, 18 insertions(+)
Config.in +10 -0
@@ -457,6 +457,16 @@ config BR2_OPTIMIZE_S endchoice +config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES + string "executables and libraries to be used by google-breakpad" + depends on BR2_PACKAGE_GOOGLE_BREAKPAD + default "" + help + You may specify a space-seperated list of binaries and libraries + here of which debug symbols should be dumped for google breakpad. + Debug symbols will be stored as google_breakpad_symbols in: + staging/usr/shared/google-breakpad-symbols + config BR2_ENABLE_SSP bool "build code with Stack Smashing Protection" depends on BR2_TOOLCHAIN_HAS_SSP
Makefile +7 -0
@@ -553,6 +553,13 @@ endif ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif +ifeq ($(BR2_PACKAGE_GOOGLE_BREAKPAD),y) + package/google-breakpad/google-breakpad-gen-syms.sh \ + $(STAGING_DIR) \ + $(HOST_DIR) \ + "$(call qstrip,$(BR2_GOOGLE_BREAKPAD_INCLUDE_FILES))" +endif + rm -rf $(TARGET_DIR)/usr/lib/luarocks $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true if test -d $(TARGET_DIR)/lib/modules; then \
package/Config.in +1 -0
@@ -786,6 +786,7 @@ source "package/fftw/Config.in" source "package/flann/Config.in" source "package/glibmm/Config.in" source "package/gmp/Config.in" +source "package/google-breakpad/Config.in" source "package/gsl/Config.in" source "package/gtest/Config.in" source "package/libargtable2/Config.in"
Signature · 1 line
1.9.3
PATCH v4 2/2 google-breakpad: integration into makefile and Config.in
Pascal, All,
On 2014-06-04 13:32 +0200, Pascal Huerst spake thusly:
Quoted 16 lines
This adds the symbol generation for google-breakpad to the
Makefileand adds a list were users can insert libraries and binaries that should be symbol-dumped.Signed-off-by Pascal Huerst <[email protected]>--- Config.in | 10 ++++++++++ Makefile | 7 +++++++ package/Config.in | 1 + 3 files changed, 18 insertions(+)Config.in +0
-0
Config.in config BR2_OPTIMIZE_S · line 465
Quoted 9 lines
Config.in +6
-0@@ -457,6 +457,16 @@ config BR2_OPTIMIZE_S endchoice +config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES + string "executables and libraries to be used by google-breakpad" + depends on BR2_PACKAGE_GOOGLE_BREAKPAD + default "" + help + You may specify a space-seperated list of binaries and libraries
"separated"
Config.in config BR2_OPTIMIZE_S · line 468
Quoted 3 lines
Config.in +3
-0+ here of which debug symbols should be dumped for google breakpad. + Debug symbols will be stored as google_breakpad_symbols in: + staging/usr/shared/google-breakpad-symbols
Replace 'staging' with '$(STAGING_DIR)'
Also, state that the files should be full paths relative to $(TARGET_DIR)
Makefile endif · line 557
Quoted 13 lines
Config.in +0
-0config BR2_ENABLE_SSP bool "build code with Stack Smashing Protection" depends on BR2_TOOLCHAIN_HAS_SSPMakefile +2
-0@@ -553,6 +553,13 @@ endif ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif +ifeq ($(BR2_PACKAGE_GOOGLE_BREAKPAD),y) + package/google-breakpad/google-breakpad-gen-syms.sh \
As said in my review on your previous patch, you should use EXTRA_ENV here:
$(EXTRA_ENV) package/google-breakpad/gen-syms.sh $(STAGING_DIR) \
$(TARGET_DIR) $(call qstrip,$(BR2_GOOGLE_BREAKPAD_INCLUDE_FILES))We do not quote BR2_GOOGLE_BREAKPAD_INCLUDE_FILES since we want to pass each entry as its own arg on the command line.
Also, maybe name the script just 'gen-syms.sh', it's shorter, so you can fit more on a line. ;-)
Quoted 13 lines
Makefile +5
-0+ $(STAGING_DIR) \ + $(HOST_DIR) \ + "$(call qstrip,$(BR2_GOOGLE_BREAKPAD_INCLUDE_FILES))" +endif + rm -rf $(TARGET_DIR)/usr/lib/luarocks $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true if test -d $(TARGET_DIR)/lib/modules; then \package/Config.in +0
-0
package/Config.in source "package/fftw/Config.in" · line 789
Quoted 4 lines
package/Config.in +1
-0@@ -786,6 +786,7 @@ source "package/fftw/Config.in" source "package/flann/Config.in" source "package/glibmm/Config.in" source "package/gmp/Config.in" +source "package/google-breakpad/Config.in"
This should be part of your previous patch. And it should be in the "Debugging, profiling and benchmark" sub-menu, instead of "Libraries/Others".
Regards,
Yann E. MORIN.
Quoted 10 lines
package/Config.in +0
-0source "package/gsl/Config.in" source "package/gtest/Config.in" source "package/libargtable2/Config.in"Signature · 6 lines
1.9.3 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'