diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-12-21 11:36:14 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-12-21 11:36:14 +0100 |
commit | e85348e74e0fe8b107eead773c768361b12b7e2f (patch) | |
tree | c78d083b38c6a4b0349121b3e1d53a3ee30970fd | |
parent | 24d70d2119636a6ac69c250dcc9877bb9c7ddadd (diff) | |
download | wireshark-notes-e85348e74e0fe8b107eead773c768361b12b7e2f.tar.gz |
notes,sync-build.sh: notes for MPX, build adjustments
Append to PATH to avoid clobbering it when putting ccache in $PATH.
Enable SBC codec for testing.
Enable debug-prefix-map, should make relocatable debug builds easier
(where I build in a different directory and move it).
-rw-r--r-- | notes.txt | 24 | ||||
-rwxr-xr-x | sync-build.sh | 9 |
2 files changed, 29 insertions, 4 deletions
@@ -208,3 +208,27 @@ Ninja (-j10) 141.0s+/-.261s 19.90s+/-.214s 121.0s+/-.073s .366s+/-.012s export CCC_CC=clang CCC_CXX=clang++ cmake -GNinja -DCMAKE_C_COMPILER=/usr/lib/clang-analyzer/scan-build/ccc-analyzer -DCMAKE_CXX_COMPILER=/usr/lib/clang-analyzer/scan-build/c++-analyzer /tmp/wireshark/ -DCMAKE_BUILD_TYPE=Debug -DDISABLE_WERROR=1 -DENABLE_EXTRA_COMPILER_WARNINGS=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 script -c 'time scan-build -o $PWD/scanresults ninja' build.log + +Enable MPX (GCC 6) +-mmpx -fcheck-pointer-bounds +-fno-sanitize=address -fno-sanitize=undefined -fuse-ld=bfd +# Have to disable --as-needed and -pie in CMakeLists.txt too, otherwise +# -Wl,--as-needed results in: +/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/libmpxwrappers.so: undefined reference to `get_bd' +# alternatively, add -lmpx -lmpxwrappers to linker flags, see +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77267 +# -pie gives: +/usr/bin/ld.bfd: run/libgtkui.a(expert_comp_dlg.c.o)(.text+0x8526): reloc against `expert_group_vals': error 4 +/usr/bin/ld.bfd: final link failed: Nonrepresentable section on output +# fixed in binutils 2.28 https://sourceware.org/bugzilla/show_bug.cgi?id=20550 + + +# Find all hf_ variables +set pagination off +set logging on hf.txt +info variables ^hf_ +# Then find all hf_ int fields that are not registered +awk <hf-v2.3.0rc0-820-g8b04755.txt '/^File/{sub(":",""); file=$NF} /^(static )?g?int hf_/&&!/\[|\*/{sub(";",""); print "if " $NF "<1"; print " printf \"%s %s %d\\n\", \""file"\", \""$NF"\", "$NF; print "end"}' > commands +set pagination off +set logging on vals.txt +source commands diff --git a/sync-build.sh b/sync-build.sh index b25bb9a..221c0f0 100755 --- a/sync-build.sh +++ b/sync-build.sh @@ -54,8 +54,9 @@ _default_flags+=\ -fsanitize=undefined _default_flags+=\ -fdiagnostics-color _default_flags+=\ -fuse-ld=gold # Supported in GCC since 2007 (?), but only in Clang 3.8 -#_default_flags+=" -fdebug-prefix-map=$builddir=" -#_default_flags+=" -fdebug-prefix-map=$remotesrcdir=" +# In GDB, use "dir /tmp/wireshark" to add the source directory anyway. +_default_flags+=" -fdebug-prefix-map=$builddir=" +_default_flags+=" -fdebug-prefix-map=$remotesrcdir=" CFLAGS="${CFLAGS-$_default_flags -fno-common}${EXTRA_CFLAGS:+ $EXTRA_CFLAGS}" # Default to use the same CXXFLAGS as CFLAGS (common case) CXXFLAGS="${CXXFLAGS-$CFLAGS}" @@ -111,7 +112,7 @@ remotecmd="mysh() { schroot -c chroot:arch -- sh \"\$@\"; fi }; mysh -c ' -PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl; +PATH=\$PATH:/usr/bin/core_perl; if $force_cmake || [ ! -e $builddir/CMakeCache.txt ]; then mkdir -p $builddir && cd $builddir && set -x && @@ -128,7 +129,7 @@ if $force_cmake || [ ! -e $builddir/CMakeCache.txt ]; then -DENABLE_QT5=1 \ -DENABLE_GEOIP=1 \ -DENABLE_KERBEROS=1 \ - -DENABLE_SBC=0 \ + -DENABLE_SBC=1 \ -DENABLE_SMI=0 \ -DENABLE_GNUTLS=1 \ -DENABLE_GCRYPT=1 \ |