[PR #348] [MERGED] Don't use LDLFAGS when building these .so files #468

Closed
opened 2026-05-05 12:16:40 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jmcnamara/libxlsxwriter/pull/348
Author: @sjmulder
Created: 7/27/2021
Status: Merged
Merged: 7/27/2021
Merged by: @jmcnamara

Base: mainHead: pr/so-ldflags


📝 Commits (1)

  • 19cc617 Don't use LDLFAGS when building these .so files

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/Makefile (+1 -1)

📄 Description

This Makefile builds 3 versions of each object: a regular one, one
usable for linking into a shared object, and one for tests, each with
different flags. They are named .o, .so, and .to respectively -- but
these .so files are regular object files, NOT shared libraries.

Hence, they shouldn't be built with ${LDFLAGS} because no linking is
happening here, they're just regular object files compiled with -c.

Passing on LDFLAGS here anyway can cause warnings or errors like this:

$ make V=1 LDFLAGS=-Wl,-rpath,/opt/pkg/lib
...
cc -fPIC -I../include -Wl,-rpath,/opt/pkg/lib -g -O3 -Wall -Wextra -Wstrict-prototypes -pedantic -ansi    -c app.c -o app.so
clang: warning: -Wl,-rpath,/opt/pkg/lib: 'linker' input unused [-Wunused-command-line-argument]
...

(Of course the actual linking into libxlsxwriter.so or .dylib still
uses LDFLAGS.)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jmcnamara/libxlsxwriter/pull/348 **Author:** [@sjmulder](https://github.com/sjmulder) **Created:** 7/27/2021 **Status:** ✅ Merged **Merged:** 7/27/2021 **Merged by:** [@jmcnamara](https://github.com/jmcnamara) **Base:** `main` ← **Head:** `pr/so-ldflags` --- ### 📝 Commits (1) - [`19cc617`](https://github.com/jmcnamara/libxlsxwriter/commit/19cc6174c8a0b6fb12fa0abb80ec0e25e27506d5) Don't use LDLFAGS when building these .so files ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Makefile` (+1 -1) </details> ### 📄 Description This Makefile builds 3 versions of each object: a regular one, one usable for linking into a shared object, and one for tests, each with different flags. They are named .o, .so, and .to respectively -- but these .so files are regular object files, NOT shared libraries. Hence, they shouldn't be built with ${LDFLAGS} because no linking is happening here, they're just regular object files compiled with -c. Passing on LDFLAGS here anyway can cause warnings or errors like this: $ make V=1 LDFLAGS=-Wl,-rpath,/opt/pkg/lib ... cc -fPIC -I../include -Wl,-rpath,/opt/pkg/lib -g -O3 -Wall -Wextra -Wstrict-prototypes -pedantic -ansi -c app.c -o app.so clang: warning: -Wl,-rpath,/opt/pkg/lib: 'linker' input unused [-Wunused-command-line-argument] ... (Of course the actual linking into libxlsxwriter.so or .dylib still uses LDFLAGS.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 12:16:40 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#468
No description provided.