-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt_pid: fix building with upstream binutils
Upstream libopcodes (really, libbfd) requires the inclusion of BFD's <config.h> before it will work. Unfortunately, BFD's <config.h> is not installed and is in any case absolutely chock-full of things we do not want contaminating the DTrace build. This is basically not necessary on Linux (though it is on many more obscure platforms), so most Linux distros patch the check out -- but it's still there upstream, so we should handle it. So introduce a new <disasm.h> header that wraps <dis-asm.h> and fools it into believing that we have included BFD's <config.h> even though we haven't. To avoid breaking the configury tests, Makeconfig is adjusted to look in our include/ directory for headers, and to test against our new <disasm.h>. Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
1 parent
ee75f90
commit de8ebd9
Showing
3 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. | ||
* Licensed under the Universal Permissive License v 1.0 as shown at | ||
* http://oss.oracle.com/licenses/upl. | ||
*/ | ||
|
||
#ifndef _DISASM_H | ||
#define _DISASM_H | ||
|
||
/* | ||
* An interface to BFD dis-asm.h. This is difficult to #include because | ||
* it includes headers that require bfd's config.h to be included first, | ||
* which is not an installed file. It's unnecessary on any platform | ||
* DTrace works on, so we fool BFD into thinking it's installed here. | ||
*/ | ||
|
||
#define PACKAGE fool-me-once | ||
#define PACKAGE_VERSION 0.666 | ||
|
||
#include <dis-asm.h> | ||
|
||
#undef PACKAGE | ||
#undef PACKAGE_VERSION | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters