Ticket #1975 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

GHC cc phase doesn't add -framework-path flags

Reported by: judah Owned by: igloo
Priority: low Milestone: 6.8.3
Component: Compiler Version: 6.8.1
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When compiling a C file with ghc, framework search paths (-framework-path) are not passed to gcc. For example, compiling the test file rl.c with GNUreadline.framework stored in $HOME/Library/Frameworks:

$ cat rl.c 
#include <stdio.h>
#include <GNUreadline/readline/readline.h>

int main(void) {
    char *line = readline("Enter a line: ");
    if (line) printf("Line was:%s\n",line);
    return 0;
}
$ gcc -F$HOME/Library/Frameworks -framework GNUreadline rl.c
$ ghc -framework-path $HOME/Library/Frameworks -framework GNUreadline rl.c

rl.c:2:43:
     error: GNUreadline/readline/readline.h: No such file or directory
rl.c: In function 'main':

rl.c:5:0:  warning: implicit declaration of function 'readline'

rl.c:5:0:
     warning: initialization makes pointer from integer without a cast

This bug was found by Christian Maeder when creating a potential fix for #1395. Discussion in that task is revolving around making GHC add $HOME/Library/Frameworks automatically; but regardless of that task's resolution, we should fix the above behavior.

Attachments

DriverPipeline.hs Download (62.9 KB) - added by maeder 5 years ago.
that's the one from #2021

Change History

Changed 5 years ago by maeder

that's the one from #2021

Changed 5 years ago by igloo

  • owner changed from judah to igloo

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Patch applied to 6.8 and HEAD branches:

Wed Dec 12 12:12:45 PST 2007  judah.jacobson@gmail.com
  * Use -framework-path flags during the cc phase.  Fixes trac #1975.

Changed 5 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple

Changed 4 years ago by simonmar

  • difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.