Skip to content

Commit

Permalink
Fix ldflags
Browse files Browse the repository at this point in the history
  • Loading branch information
normanmaurer committed Oct 31, 2024
1 parent 7bd58ec commit 3210805
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions boringssl-static/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,28 @@
</configuration>
</execution>

<execution>
<id>ldflags-setup</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Add the ant tasks from ant-contrib -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />

<!-- If we compile on linux we need to adjust the ldflags to correct link libstdc++ -->
<if>
<equals arg1="${os.detected.name}" arg2="linux" />
<then>
<property name="ldFlags" value="-L${boringsslHome}/ssl -L${boringsslHome}/crypto -lssl -lcrypto -static-libstdc++ -l:libstdc++.a" />
</then>
</if>
</target>
</configuration>
</execution>

<!-- Build the additional JAR that contains the native library. -->
<execution>
<id>native-jar</id>
Expand Down Expand Up @@ -668,17 +690,6 @@
</build>
</profile>

<profile>
<id>linux</id>
<activation>
<os>
<family>linux</family>
</os>
</activation>
<properties>
<ldflags>-L${boringsslHome}/ssl -L${boringsslHome}/crypto -lssl -lcrypto -static-libstdc++ -l:libstdc++.a</ldflags>
</properties>
</profile>
<profile>
<id>linux-aarch64</id>

Expand Down

0 comments on commit 3210805

Please sign in to comment.