bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #48348] gnustep-config output is unusable


From: Stef
Subject: [bug #48348] gnustep-config output is unusable
Date: Wed, 29 Jun 2016 23:49:38 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

URL:
  <http://savannah.gnu.org/bugs/?48348>

                 Summary: gnustep-config output is unusable
                 Project: GNUstep
            Submitted by: stefanbidi
            Submitted on: Wed 29 Jun 2016 11:49:36 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I was trying to use gnustep-config to link a program of mine (instead of using
GNUstep-make) and ran into a major bug: gnustep-config makes a few assumptions
that aren't true.

My understand of how *-config programs work is flags/cflags go to the compiler
and libs go to the linker. However, gnustep-config not only exposes private
flags/libs but also --objc-libs and --base-libs includes options that are not
accepted by the ld linker (I guess it assumes you're using $(CC) as a
linker).

Example 1, output:
$ gnustep-config --objc-flags
-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1
-DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -pthread -fPIC -Wall -DGSWARN
-DGSDIAGNOSE -Wno-import -g -O2 -fgnu-runtime
-fconstant-string-class=NSConstantString -I.
-I/home/user/GNUstep/Library/Headers -I/usr/include

In this example, the following should not be part of the output: (1) -MMD and
-MP; (2) -fPIC (private-use-only, I decide if this flag applies to my
application); (3) -Wall (private-use-only, I should decide what warnings I
want to see); (4) -pthread (not application to CFLAGS, -lpthread should be
passed to linker instead); (5) -g -O2 (private-use-only, I decide the
optimization level and if I want debug symbols); (6) -I. (I don't understand
why this is even here).

Expected output: -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN
-DGSDIAGNOSE -fno-strict-aliasing -fgnu-runtime
-fconstant-string-class=NSConstantString -I/usr/include

Example 2, output:
$ gnustep-config --objc-libs
-rdynamic -shared-libgcc -pthread -fgnu-runtime
-L/home/user/GNUstep/Library/Libraries -L/usr/lib -lobjc -lm

Expected output: -L/usr/lib -lobjc

In this example, the following should not be part of the output:
(1) -rdynamic (private-use-only and not recognized by the linker, ld); (2)
-shared-libgcc (private-use-only and also not recognized by ld); (3) -pthread
(private-use-only, and ld doesn't recognize); (4) -fgnu-runtime (ld does not
recognize); (5) -lm (private-use-only, my application might not need this.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48348>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]