Closed mxaddict closed 1 year ago
@herumi I've created this build step that can create asm files as needed, could you give this a test?
@herumi have you had a moment to check this?
Sorry, I have to save my job because I got a bad headache. I'll check it little by little.
Sorry, I have to save my job because I got a bad headache. I'll check it little by little.
No worries 👍🏼
Now the name of a generated asm from bint$(BIT).ll is generically src/asm/bint$(BIT)-$(OS)-$(CPU).
But the name in your patch is bint$(BIT)-$(CPU).
I append $(OS) to distinguish M1 Mac and AArch64 Linux / x64 Linux and x64 Windows.
Don't you think that's necessary?
If so, how about src/bint-$(TARGET) -target $(TARGET)
? It is simple.
Which do you need, lib/libmcl.a or lib/bn384_256.a ?
we need lib/libmcl.a
to link against herumi/bls
I'm not sure actually, cause I noticed that linux aarch64 and mac arm64 when creating the asm files had the same results when using the same clang versions. so I think they are interchangeable.
I'm not sure actually, cause I noticed that linux aarch64 and mac arm64 when creating the asm files had the same results when using the same clang versions. so I think they are interchangeable.
I think we might need to do more investigation
we need lib/libmcl.a to link against herumi/bls
Then, I think that it is better to modify bls/Makefile.onelib . I'll let it support cross-compile.
Would this mean compiling bls, but without having a libmcl.a ?
Would this mean compiling bls, but without having a libmcl.a ?
At first, libmcl.a was developed separately. But for convenience of libbls, it contains libmcl.a in bls-eth-go-binary. It is not so good, but it remains for backward compatibility. bls/Makefile.one lib is to make the library.
https://github.com/herumi/bls/blob/dev/Makefile.onelib#L180-L186 seems to be able to make libbls384_256.a for aarch64 and i686 on x86-64 Linux. Could you check it? If it is okay, I'll add the other configuration.
Would this mean compiling bls, but without having a libmcl.a ?
At first, libmcl.a was developed separately. But for convenience of libbls, it contains libmcl.a in bls-eth-go-binary. It is not so good, but it remains for backward compatibility. bls/Makefile.one lib is to make the library.
https://github.com/herumi/bls/blob/dev/Makefile.onelib#L180-L186 seems to be able to make libbls384_256.a for aarch64 and i686 on x86-64 Linux. Could you check it? If it is okay, I'll add the other configuration.
I'll check it out.
This command is https://github.com/herumi/mcl/blob/master/Makefile#L189-L190
$(BINT_SRC): src/bint$(BIT).ll
$(CLANG) -S $< -o $@ -no-integrated-as -fpic -O2 -DNDEBUG -Wall -Wextra $(CLANG_TARGET) $(CFLAGS_USER)
Related to https://github.com/herumi/mcl/issues/153