Skip to content

Commit 7ceb762

Browse files
committed
Update README
1 parent 430848b commit 7ceb762

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

README.md

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,16 @@ The general workflow is clone Wei Dai's Crypto++, fetch the Autotools files, and
3838
git clone https://github.com/weidai11/cryptopp.git
3939
cd cryptopp
4040

41+
wget -O configure.ac https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/bootstrap.sh
4142
wget -O configure.ac https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/configure.ac
4243
wget -O Makefile.am https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/Makefile.am
4344
wget -O libcryptopp.pc.in https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/libcryptopp.pc.in
4445

4546
mkdir -p "$PWD/m4/"
4647

47-
Once you have the files you can run `autoreconf` and friends. Our testing showed `autoupdate` produced bad results on some versions of Autotools, so it is hit or miss whether it should be run.
48+
Once you have the files you can run `bootstrap.sh`. `bootstrap.sh` performs the necessary preamble and also runs `autoupdate`. Our testing showed `autoupdate` produced bad results on some versions of Autotools, so it is hit or miss whether it should be run.
4849

49-
autoupdate
50-
libtoolize --force --install
51-
autoreconf --force --install
50+
./bootstrap.sh
5251

5352
./configure <options>
5453

@@ -58,7 +57,7 @@ Once you have the files you can run `autoreconf` and friends. Our testing showed
5857

5958
Best performance is obtained with `-O3` because GCC (and other compiler) apply vectorization optimizations. If you are not forced to `-O2` by policy (like Debian or Fedora), then you should configure with a higher optimization enabled:
6059

61-
CXXFLAGS="-DNDEBUG -g2 -O3" ./configure <other options>
60+
CPPFLAGS="-DNDEBUG" CXXFLAGS="-g2 -O3" ./configure <other options>
6261

6362
Despite our efforts we have not been able to add the submodule to Crypto++ for seamless integration. If anyone knows how to add a submodule directly to the Crypto++ directory, then please provide the instructions.
6463

@@ -73,7 +72,7 @@ If you mix and match Master with a release zip file then things may not work as
7372
Before running the Autotools project please ensure you have the following installed:
7473

7574
1. autoupdate
76-
2. autoconf
75+
2. autoconf and autoreconf
7776
3. automake
7877
4. libtool
7978

@@ -88,28 +87,7 @@ The library's `GNUmakefile` and `GNUmakefile-cross` were modified to clean the a
8887

8988
## Cross-compiles
9089

91-
Cross-compiles are mostly broken due to Autotools. The biggest problem seems to be Autotools inability to honor a C++ project settings. Using Android as an example:
92-
93-
* `configure.ac` sets `AC_PROG_CXX`
94-
* `configure.ac` sets `AC_LANG([C++])`
95-
* User sets `CXX=/opt/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++`
96-
* User sets `LD=/opt/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++`
97-
* User sets `CXXFLAGS="-target armv7-none-linux-androideabi21 ...`
98-
* User sets `LDFLAGS="-Wl,-target=armv7-none-linux-androideabi21 ...`
99-
* User invokes `./configure --host=$(config.guess) --build=armv7-none-linux-androideabi21`
100-
101-
Autotools will perform a test using the host's gcc and fail with:
102-
103-
```
104-
configure:3481: checking whether the C compiler works
105-
configure:3503: gcc -Wl,-target=armv7-none-linux-androideabi21 ... conftest.c >&5
106-
/usr/bin/ld: unrecognised emulation mode: thumb
107-
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om
108-
elf_k1om i386pep i386pe
109-
collect2: error: ld returned 1 exit status
110-
```
111-
112-
Autotools absolutely sucks. The maintainers have had 30 years to get it right and their shit is still broken.
90+
Cross-compiles may work. The biggest problem seems to be libtool and shared object naming. Autotools fails to produce a shared object on platforms like Android.
11391

11492
## Collaboration
11593
We would like all distro maintainers to be collaborators on this repo. If you are a distro maintainer then please contact us so we can send you an invite.

0 commit comments

Comments
 (0)