45 Commits

Author SHA1 Message Date
Paul Floyd
6af21da952 Bug 452779 Valgrind fails to build on FreeBSD 13.0 with llvm-devel (15.0.0)
Only link with libgcc-sup if the compiler is clang.
Still need -lgcc
2022-04-27 21:10:35 +02:00
Paul Floyd
1dbc46750f Bug 452779 Valgrind fails to build on FreeBSD 13.0 with llvm-devel (15.0.0)
This fixes building.

I may make the -lgcc and libgcc-sup conditonal on not using clang later.
2022-04-19 22:03:01 +02:00
Paul Floyd
e2583c02a5 FreeBSD support, patch 2
Files in the root directory
Several Makefile.am files that have dependencies on FreeBSD autoconf
variables. Included a few new filter files to act as placeholders
to create new freebsd subdirectories.

Updated NEWS with the FreeBSD bugzilla items plus a couple of other
items fixed indirectly.
2021-10-07 08:18:47 +02:00
Mark Wielaard
abbc0761fa gcc10 arm64 build needs __getauxval for linking with libgcc
Provide a new library libgcc-sup-<platform>.a that contains symbols
needed by libgcc. This needs to be linked after -lgcc to provide
any symbols missing which would normally be provided by glibc.
At the moment this only provides __getauxval on arm64 linux.

https://bugs.kde.org/show_bug.cgi?id=421321
2020-05-15 15:22:14 +02:00
Petar Jovanovic
24c1f4ada3 mips: Add nanoMIPS support to Valgrind 3/4
Necessary changes to support nanoMIPS on Linux.

Part 3/4 - Coregrind and tools changes

Patch by Aleksandar Rikalo, Dimitrije Nikolic, Tamara Vlahovic,
Nikola Milutinovic and Aleksandra Karadzic.

Related KDE issue: #400872.
2019-12-31 09:44:42 +00:00
Ivo Raisr
246bb0e25f Remove TileGX/Linux port.
Fixes BZ#379504.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16340
2017-05-08 17:21:59 +00:00
Ivo Raisr
10fe719d7a Explicitly mark the stack as non-executable for Solaris
binaries (Valgrind launcher and tools).
Follow-up for r15692. n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15696
2015-10-02 16:45:01 +00:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Julian Seward
082f9298a1 Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
Valgrind aspects, to match vex r3124.

See bug 339778 - Linux/TileGx platform support to Valgrind



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
2015-04-10 12:30:09 +00:00
Carl Love
914f75de32 This commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334834 and 334836.  The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code.  This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific.  The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

Signed-off-by: Carl Love <carll@us.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238
2014-08-07 23:17:29 +00:00
Mark Wielaard
895f25f4a2 Add uninstall-local rules to make distcheck happy.
Also remove generated FAQ.txt in docs distclean-local rule.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13950
2014-05-09 14:25:39 +00:00
Julian Seward
3f6d211236 Add support for ARMv8 AArch64 (the 64 bit ARM instruction set).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13770
2014-01-12 12:54:00 +00:00
Tom Hughes
b31167235f Cope with old linkers which don't support -Ttext-segment but which do
generate build-id sections. #317091.  (Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13346
2013-03-28 15:53:21 +00:00
Julian Seward
c7f8191472 Use -Wl,-Ttext-segment when static linking if possible to keep build-ids.
Fixes #317091.  (Mark Wielaard, mjw@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13331
2013-03-22 11:49:46 +00:00
Petar Jovanovic
5dd4c02e39 mips: adding MIPS64LE support to Valgrind
Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292
2013-02-27 23:17:33 +00:00
Julian Seward
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Julian Seward
68cf6ae28d Some fixes for Android:
* initial support for Pandaboard/Linaro
* on Android/ARM, ask for non-executable stacks in the executables
* disable Memcheck's strcasestr intercept; its use of tolower()
  causes the dynamic linker to fail.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12234
2011-10-26 15:10:49 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Bart Van Assche
94b8698cc8 Added a configure test for the linker flag --build-id=none.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11164
2010-06-08 18:23:59 +00:00
Julian Seward
c46347280b Add a new program (link_tool_exe.c) and use this to link the tool
executables.  Gets rid of the linker script kludgery and uniformly
uses -Ttext=0x38000000 (or whatever) on Linux, so as to accomodate
both traditional ld and gold.  Should fix #193413 although I have
been unable to test it.  Using a whole new program seems like
overkill, but this is infrastructure to support static linking of
the tool executables on MacOS too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11141
2010-06-02 00:31:34 +00:00
Julian Seward
e9de458500 Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982
2010-01-01 11:59:33 +00:00
Nicholas Nethercote
dbcea71779 More docs build tweaks:
- Actually remove the dead docs/images/massif*.png files (this was meant to
  happen in r10720).

- Inline $TOOL/docs/Makefile.am into $TOOL/Makefile.am for all 10 tools.  10
  fewer Makefile.am files FTW!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10721
2009-08-05 08:08:18 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
e91540cc58 Merged r9596 (build system tweaks, minus the Darwin bits) from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9598
2009-04-24 04:12:28 +00:00
Julian Seward
5d49360cbb Use dashes rather than underscores in library names (njn).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9223
2009-02-22 23:40:31 +00:00
Nicholas Nethercote
f0f8b48fcf Merge the non-Darwin parts of r9140 (install vgpreload .dSYMs), just to keep
the trunk and DARWIN branch in sync.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9141
2009-02-12 00:30:02 +00:00
Nicholas Nethercote
1690244664 Merged r9120 (Merge Makefile.{inplace,install}.am, and simplify installation
of libmpiwrap.so) from trunk.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9121
2009-02-06 23:27:16 +00:00
Nicholas Nethercote
2d5f140a5b Make Makefile.install.am much less confusing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9118
2009-02-06 07:12:57 +00:00
Nicholas Nethercote
b7b48cb4a6 Removed Makefile.core.am with some judicious refactoring. Also fix a stupid
typo in launcher-linux.c that was added in the last commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9116
2009-02-06 05:34:19 +00:00
Nicholas Nethercote
009cd24326 Removed Makefile.core.am with some judicious refactoring.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9114
2009-02-06 04:49:14 +00:00
Nicholas Nethercote
eb4a905f4c Merge r9110 (inline Makefile.tool-flags.am) from DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9111
2009-02-06 04:05:43 +00:00
Julian Seward
ecc35db60b If gcc supports -fno-stack-protector, use it. This should fix
compilation failures on distros where -fstack-protector is enabled by
default.  See #144112.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6721
2007-05-01 13:44:08 +00:00
Julian Seward
713b2d46c0 Merge r6086:
Makefile.am changes for AIX5.  Almost all boilerplate stuff fitting in
with the existing factorisation scheme.  The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
2006-10-17 00:56:43 +00:00
Julian Seward
c4e98cbd7f Ensure -Wdeclaration-after-statement gets through to vex-land.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5593
2006-01-25 02:58:28 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Dirk Mueller
d854bab3df we don't need libc. so don't link it
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5060
2005-11-10 00:40:26 +00:00
Tom Hughes
b5c033e906 Dual architecture support - this commit is a major rework of the build
system that allows multiple copies of valgrind to be built so that we
can build both x86 and amd64 versions of the tools on amd64 machines.

The launcher is then modified to look at the program being run and
decide which tool to use to run it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5027
2005-11-07 15:24:38 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
eb32bc7045 Modularised the malloc/free stuff into two modules: m_mallocfree for the
malloc/free implementation, and m_replacemalloc with the stuff for the tools
that replace malloc with their own version.  Previously these two areas of
functionality were mixed up somewhat.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3648
2005-05-10 02:47:21 +00:00
Nicholas Nethercote
67d6dc6e2b Arch-abstraction:
- In Cachegrind, abstract out x86-specific use of CPUID to find cache
  configuration.  Required adding a cachegrind/x86/ directory, and fiddling
  a bit with the build system.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2698
2004-09-11 16:45:27 +00:00
Nicholas Nethercote
18355ff96b Arch-abstraction:
- Added include/x86/:  contains tool_arch.h, Makefile.am, .cvsignore.

- Added coregrind/x86/state.c.  Contains some arch-specific code for dealing
  with x86 registers -- eg. setting up the baseBlock, loading/saving the whole
  register state.  It is compiled into coregrind/x86/libarch.a and linked via
  ${VG_ARCH} with the core.

  Relatedly, also added coregrind/x86/{core_arch.h,core_arch_asm.h}.

- Correspondingly abstracted the register state out of ThreadState.  This
  affected every place that touches registers, and there are a lot of them.
  (Eventually all the register touching should be abstracted out in an
  arch-neutral way, but not yet;  one step at a time.)

- Added some declarations about register loading/saving functions to core.h;
  all architectures will have to provide these functions.

- Rejigged the build system so that the arch-specific stuff is all done via
  ${VG_ARCH}, rather than naming e.g. x86/ directly.  Appropriate -I arguments
  are used so that all the headers are found, etc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2656
2004-09-03 13:45:29 +00:00
Nicholas Nethercote
acd57ac595 Use Makefile.am includes. This gets rid of 110 lines of repetitive Makefile.am
cruft, yay!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2641
2004-09-01 23:20:49 +00:00