bugGforth - Bugs: bug #20544, libcc.fs doesn't work on Mac OS X

 
 

bug #20544: libcc.fs doesn't work on Mac OS X

Submitter:  Darren Bane <dbane>
Submitted:  Fri 20 Jul 2007 07:57:34 PM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  anton
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Sat 21 Jul 2007 06:20:49 PM UTC, comment #2: 

Making it a deferred word is a stopgap measure, but in the long run we
cannot expect every Gforth user to find out how to do this stuff on
their platform, and define compile-wrapper-function appropriately.

I guess a few different definitions for the different OSs should be
sufficient.  It would be nice if C compilers had a common command-line
interface for this sort of stuff, but apparently this is not the case.

Concerning the bin directory needed for MacOS X, this looks like it
should be the bindir in the Makefile, and should be fed into the image
in the same way that includedir is fed in, i.e., through getenv during
image generation.

BTW, please generate your patches with "diff -u ...". TIA.

Ok, I have applied your latest patch and the changes needed to get
bindir into the environment.

Anton Ertl <anton>
Project Administrator
Sat 21 Jul 2007 12:26:25 AM UTC, comment #1: 

I explored this a bit more, and think that

  • install still needs to lose the -s flag; and
  • no matter how you change it, compile-wrapper-function will be unsatisfactory.

So I'd prefer to have compile-wrapper-function a DEFERred word. Then users can override it how they like.  For example, here is a definition to work with plan9port:

:NONAME ( -- )
    c-source-file close-file throw
    0 c-source-file-id !
    s" 9c -I /Users/darrenbane/include -o "
    lib-filename 2@ s+ s" .o " append
    lib-filename 2@ append s" .c" append ( c-addr u )
    2dup system drop free throw
    $? abort" compiler generated error" \ !! call dlerror

    S" 9l -bundle -bundle_loader /Users/darrenbane/bin/gforth-0.6.9-20070604 -o\
 " lib-filename 2@ s+
    S" .bundle " append lib-filename 2@ append S" .o" append
    2dup system drop free throw
    $? abort" linker generated error"

    lib-filename 2@ s" .bundle" s+
    2dup open-lib dup 0= abort" open-lib failed" \ !! call dlerror
    ( lib-handle ) lib-handle-addr @ !
    2dup delete-file throw drop free throw
    lib-filename 2@ s" .c" s+ 2dup delete-file throw drop free throw
    lib-filename 2@ s" .o" s+ 2dup delete-file throw drop free throw
    lib-filename 2@ drop free throw 0 0 lib-filename 2! ; IS compile-wrapper-fu\
nction

Darren Bane <dbane>
Fri 20 Jul 2007 07:57:34 PM UTC, original submission:  

Patch to fix this attached. However, I'm not happy with it: you need to hard-code the location of the eventual gforth binary.  Suggestions welcomed.

Darren Bane <dbane>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #13410:  patch-libcc added by dbane (754B - application/octet-stream - Replacement patch, makes compile-wrapper-function DEFERred)
file #13409:  patch-libcc added by dbane (2KiB - application/octet-stream - Patch to apply in gforth directory)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by anton (Posted a comment)
  • -email is unavailable- added by dbane (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-07-21 anton StatusNone Fixed
        Assigned toNone anton
        Open/ClosedOpen Closed
    2007-07-21 dbane Attached File- Added patch-libcc, #13410
    2007-07-20 dbane Attached File- Added patch-libcc, #13409

    Back to the top


    Powered by Savane 3.9