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 gen_context/ASM build on ARM #935

Conversation

real-or-random
Copy link
Contributor

These are two attempts to fix #931.

@gmaxwell Can you test if either if the first commits solves the issue?
(The third commit is just a minor cleanup thing that I discovered on the way).

If yes, I'd probably prefer the first commit, which is a real fix. But we could still apply the second commit if people think that's a good idea.

This passes $(DEFS) (which should literally be "-DHAVE_CONFIG_H") to the
compiler and $(COMMON_LIB) (which is necessary when using external ASM
to the linker) when building gen_context.
@real-or-random
Copy link
Contributor Author

Ok, CI answered my question: https://cirrus-ci.com/task/5313033309257728

The idea of the first commit is of course stupid and does not work when cross-compiling. We can't simply link the $(COMMON_LIB) (e.g., built for ARM) into gen_context (e.g., build for x86).

The above CI failure is different but when I saw it, I still recognized my mistakes. So CI was a good teddy bear here.

I'll open another PR with only the second commit and a rephrased comment.

sipa added a commit that referenced this pull request May 4, 2021
c848352 Makefile.am: Don't pass a variable twice (Tim Ruffing)
2161f31 Makefile.am: Honor config when building gen_context (Tim Ruffing)
99f47c2 gen_context: Don't use external ASM because it complicates the build (Tim Ruffing)

Pull request description:

  Obsoletes #935.

ACKs for top commit:
  gmaxwell:
    ACK c848352   looks good and works here. Undefign is kinda yuck, but it is already doing it and it's cleaner than the obvious alternatives.
  sipa:
    utACK c848352. I verified that building still works on ARM64, but without asm of course.

Tree-SHA512: fc5500688b2aecc4238e21c32f65559bcbfd1e83d1ae4d2c8e15573e94613667731064d8b5f2b9e4209016d88118263802ff4b9a73c1f37c224ccf2a4a1d6536
real-or-random added a commit to real-or-random/secp256k1 that referenced this pull request Dec 2, 2021
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer  necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
real-or-random added a commit to real-or-random/secp256k1 that referenced this pull request Dec 2, 2021
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
fanquake pushed a commit to fanquake/secp256k1 that referenced this pull request Dec 3, 2021
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
real-or-random added a commit to real-or-random/secp256k1 that referenced this pull request Dec 3, 2021
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
real-or-random added a commit to real-or-random/secp256k1 that referenced this pull request Dec 5, 2021
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
real-or-random added a commit to real-or-random/secp256k1 that referenced this pull request Dec 9, 2021
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
dderjoel pushed a commit to dderjoel/secp256k1 that referenced this pull request May 23, 2023
This was necessary because we used to cross-compile the library but
compile the precomputation programs for the build host. Now it's no
longer necessary and we can cleanly link even the external ASM
(which was the intent of bitcoin-core#935).

On the way, remove an obsolete "-I" parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arm ASM builds are broken
1 participant