Skip to content
  • Ian Jackson's avatar
    tools: Correct PTHREAD options in config/StdGNU.mk · fa17c2e0
    Ian Jackson authored
    
    
    It is not correct to say -lpthread.  The correct option is -pthread,
    which may have sundry other effects on code generation etc.  It needs
    to be passed both to compilation and linking.
    
    Fix the configure test to test -pthread, and plumb the resulting flag
    through to PTHREAD_{CFLAGS,LDFLAGS} in Tools.mk; also substitute
    PTHREAD_LIBS (although this will currently always be empty).
    Remove PTHREAD_LIBS setting from StdGNU.mk.
    
    Fix the one user (libxc) to use PTHREAD_{CFLAGS,LDFLAGS} too.
    
    There are still some other users in tree which pass -pthread or
    -lpthread by adding it as a literal to their own compiler options.
    These will be fixed in a later patch.
    
    Signed-off-by: default avatarIan Jackson <ian.jackson@eu.citrix.com>
    Cc: Roger Pau Monne <roger.pau@entel.upc.edu>
    Acked-by: default avatarRoger Pau Monne <roger.pau@entel.upc.edu>
    Committed-by: default avatarIan Jackson <Ian.Jackson@eu.citrix.com>
    fa17c2e0