Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix multiple define problem with ppc64le #152

Merged
merged 2 commits into from
Aug 1, 2018

Conversation

clnperez
Copy link
Contributor

building anything, e.g. envoy, that also builds gperftools, results in
the error that StacktracePowerPCDummyFunction was previously defined.

Rename this one, as its only a dummy function and is only used in this
one place.

Signed-off-by: Christy Norman christy@linux.vnet.ibm.com

building anything, e.g. envoy, that also builds gperftools, results in
the error that StacktracePowerPCDummyFunction was previously defined.

Rename this one, as its only a dummy function and is only used in this
one place.

Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
@derekmauro derekmauro self-requested a review August 1, 2018 01:26
@@ -150,8 +150,8 @@ static void **NextStackFrame(void **old_sp, const void *uc) {
}

// This ensures that absl::GetStackTrace sets up the Link Register properly.
void StacktracePowerPCDummyFunction() __attribute__((noinline));
void StacktracePowerPCDummyFunction() { __asm__ volatile(""); }
void AbslStacktracePowerPCDummyFunction() __attribute__((noinline));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for finding this!

I suspect we can do even better by marking this static and using the portable symbols we've added since this code was written. Something like:

ABSL_ATTRIBUTE_NOINLINE static void AbslStacktracePowerPCDummyFunction() {
  ABSL_BLOCK_TAIL_CALL_OPTIMIZATION();
}

I'll run this though the global presubmit tonight since we don't have ppc64le test coverage for OSS contributions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Let me know if there's anything else I can do!

@clnperez
Copy link
Contributor Author

clnperez commented Aug 1, 2018

This works as well (and thanks for catching that mistake in my patch!). 👍

@derekmauro
Copy link
Member

There was no real mistake, I just wanted to modernize the code a bit before merging it. I'm going to merge as soon as the internal presubmits pass.

Thanks for your contribution!

@clnperez
Copy link
Contributor Author

clnperez commented Aug 1, 2018

Oh, oops. I thought I'd forgotten to change the actual function call from StacktracePowerPCDummyFunction to AbslStacktracePowerPCDummyFunction when I looked at your diff. n/m. :D

@derekmauro derekmauro merged commit 92e07e5 into abseil:master Aug 1, 2018
absl-federation-github pushed a commit that referenced this pull request Aug 2, 2018
--
586c41e29e80d9613434f18347d4a70a92a90989 by Jon Cohen <cohenjon@google.com>:

Whitespace cleanup

PiperOrigin-RevId: 207119388

--
e28fc6932d68f7097918f3092079f07112e684c1 by Abseil Team <absl-team@google.com>:

Fix comment typo in mutex.h

PiperOrigin-RevId: 207024211

--
b7714a5f189b2863f9cfc285ba428ca2059b83f4 by Abseil Team <absl-team@google.com>:

Raise the floor for gcc from gcc 4.7 to gcc 4.8.

PiperOrigin-RevId: 207021220

--
262ae79150278ea1b4e512dfe8ff05c32768f429 by Matt Armstrong <marmstrong@google.com>:

Raise the floor for gcc from gcc 4.7 to gcc 4.8.

PiperOrigin-RevId: 206997741

--
5aba0b15eaf6c5beff0e91670a7cdf5ad1151886 by Derek Mauro <dmauro@google.com>:

Use std::chrono to get the current time on both Apple and Windows
platforms, eliminating the unnecessarily complicated logic on Apple
platforms.

PiperOrigin-RevId: 206979219

--
807a91adf876f7532050d442f00268754c0f260b by Derek Mauro <dmauro@google.com>:

Fix multiple definition problem when Abseil is combined with
gperftools on PowerPC.

#152

PiperOrigin-RevId: 206963083
GitOrigin-RevId: 586c41e29e80d9613434f18347d4a70a92a90989
Change-Id: I0ee65a733c423890b97dd3500f2d17449792387c
absl-federation-github pushed a commit that referenced this pull request Dec 17, 2018
  - 44b0faf Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 926bfeb Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 13327de Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 3088e76 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - f6ae816 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - a06c4a1 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 7b46e1d Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 070f6e4 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 7990fd4 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - f951790 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - cc8dcd3 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - a705aa7 Merge pull request #194 from Mizux/windows by Xiaoyi Zhang <zhangxy988@gmail.com>
  - a4c3fff Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 0117457 Merge pull request #201 from ccawley2011/fix-byteswap by Matt Calabrese <38107210+mattcalabrese-google@users.noreply.github.com>
  - f86f941 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 94c298e Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 0884a6a Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - c16d555 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 45221cc Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 2019e17 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 5b70a89 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - a00bdd1 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - f340f77 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 445998d Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - e821380 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - f21d187 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 5441bbe Fix code snippet in comment (#174) by Loo Rong Jie <loorongjie@gmail.com>
  - 5aae0cf Fix CMake build (#173) by Stephan Dollberg <stephan.dollberg@gmail.com>
  - 48cd2c3 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - e291c27 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - e01d955 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 8ff1374 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 0245191 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 921fd5c Merge pull request #166 from rongjiecomputer/cmake-test by Gennadiy Civil <gennadiycivil@users.noreply.github.com>
  - fb46222 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - c075ad3 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 0f4bc96 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 6c7e5ff Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - d6df769 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 28080f5 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 9c987f4 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 5e7d459 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - bed5bd6 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - fefc836 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - d8cfe9f Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - ad5c960 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 86f0fe9 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - f0f15c2 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 29ff6d4 Removed "warning treated as error" flag from MSVC (#153) by vocaviking <vocaviking@users.noreply.github.com>
  - 083d04d Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - bea85b5 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 8f96be6 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 92e07e5 Merge pull request #152 from clnperez/fix-multi-defines-p... by Derek Mauro <761129+derekmauro@users.noreply.github.com>
  - 2125e64 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 9acad86 Merge pull request #150 from OlafvdSpek/patch-2 by Jonathan Cohen <cohenjon@google.com>
  - c2e00d3 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 9e06068 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 7aa411c Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 2c5af55 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 44aa275 Merge pull request #143 from rongjiecomputer/kernel by Xiaoyi Zhang <zhangxy988@gmail.com>
  - 42f22a2 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - b973bc5 Merge pull request #139 from siepkes/smartos-support by ahedberg <ahedberg@google.com>
  - e0def74 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - f826f1d Merge pull request #138 from edbaunton/remove-deprecated-... by ahedberg <ahedberg@google.com>
  - 7b50a4a Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - a5030ca Merge pull request #144 from rongjiecomputer/winsock2 by Xiaoyi Zhang <zhangxy988@gmail.com>
  - 0268795 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 8f612eb Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 134496a Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - ba8d6cf Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - be1e84b Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 16ac2ec Merge pull request #134 from rongjiecomputer/cmake by Alex Strelnikov <strel@google.com>
  - 7efd8dc Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 87a4c07 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>
  - 4491d60 Export of internal Abseil changes. by Abseil Team <absl-team@google.com>

GitOrigin-RevId: 44b0faf
Change-Id: I2c427b5b41b2d34101922048b00f3d9dafcb498d
4s5t2os41n added a commit to 4s5t2os41n/abseil-cpp that referenced this pull request Jul 4, 2024
--
586c41e29e80d9613434f18347d4a70a92a90989 by Jon Cohen <cohenjon@google.com>:

Whitespace cleanup

PiperOrigin-RevId: 207119388

--
e28fc6932d68f7097918f3092079f07112e684c1 by Abseil Team <absl-team@google.com>:

Fix comment typo in mutex.h

PiperOrigin-RevId: 207024211

--
b7714a5f189b2863f9cfc285ba428ca2059b83f4 by Abseil Team <absl-team@google.com>:

Raise the floor for gcc from gcc 4.7 to gcc 4.8.

PiperOrigin-RevId: 207021220

--
262ae79150278ea1b4e512dfe8ff05c32768f429 by Matt Armstrong <marmstrong@google.com>:

Raise the floor for gcc from gcc 4.7 to gcc 4.8.

PiperOrigin-RevId: 206997741

--
5aba0b15eaf6c5beff0e91670a7cdf5ad1151886 by Derek Mauro <dmauro@google.com>:

Use std::chrono to get the current time on both Apple and Windows
platforms, eliminating the unnecessarily complicated logic on Apple
platforms.

PiperOrigin-RevId: 206979219

--
807a91adf876f7532050d442f00268754c0f260b by Derek Mauro <dmauro@google.com>:

Fix multiple definition problem when Abseil is combined with
gperftools on PowerPC.

abseil/abseil-cpp#152

PiperOrigin-RevId: 206963083
GitOrigin-RevId: 586c41e29e80d9613434f18347d4a70a92a90989
Change-Id: I0ee65a733c423890b97dd3500f2d17449792387c
markfjqv added a commit to markfjqv/abseil-cpp that referenced this pull request Aug 5, 2024
--
586c41e29e80d9613434f18347d4a70a92a90989 by Jon Cohen <cohenjon@google.com>:

Whitespace cleanup

PiperOrigin-RevId: 207119388

--
e28fc6932d68f7097918f3092079f07112e684c1 by Abseil Team <absl-team@google.com>:

Fix comment typo in mutex.h

PiperOrigin-RevId: 207024211

--
b7714a5f189b2863f9cfc285ba428ca2059b83f4 by Abseil Team <absl-team@google.com>:

Raise the floor for gcc from gcc 4.7 to gcc 4.8.

PiperOrigin-RevId: 207021220

--
262ae79150278ea1b4e512dfe8ff05c32768f429 by Matt Armstrong <marmstrong@google.com>:

Raise the floor for gcc from gcc 4.7 to gcc 4.8.

PiperOrigin-RevId: 206997741

--
5aba0b15eaf6c5beff0e91670a7cdf5ad1151886 by Derek Mauro <dmauro@google.com>:

Use std::chrono to get the current time on both Apple and Windows
platforms, eliminating the unnecessarily complicated logic on Apple
platforms.

PiperOrigin-RevId: 206979219

--
807a91adf876f7532050d442f00268754c0f260b by Derek Mauro <dmauro@google.com>:

Fix multiple definition problem when Abseil is combined with
gperftools on PowerPC.

abseil/abseil-cpp#152

PiperOrigin-RevId: 206963083
GitOrigin-RevId: 586c41e29e80d9613434f18347d4a70a92a90989
Change-Id: I0ee65a733c423890b97dd3500f2d17449792387c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants