| diff --git a/bin/mklib b/bin/mklib |
| --- a/bin/mklib |
| +++ b/bin/mklib |
| @@ -39,7 +39,7 @@ CPLUSPLUS=0 |
| STATIC=0 |
| DLOPEN=0 |
| INSTALLDIR="." |
| -ARCH="auto" |
| +ARCH="nacl" |
| ARCHOPT="" |
| NOPREFIX=0 |
| EXPORTS="" |
| @@ -213,6 +213,11 @@ if [ ] ; then |
| echo "-----------------" |
| echo ARCH is $ARCH |
| echo LIBNAME is $LIBNAME |
| + echo CC is $CC |
| + echo CXX is $CXX |
| + echo AR is $AR |
| + echo LD is $LD |
| + echo RANLIB is $RANLIB |
| echo MAJOR is $MAJOR |
| echo MINOR is $MINOR |
| echo PATCH is $PATCH |
| @@ -228,15 +233,15 @@ fi |
| # |
| case $ARCH in |
| |
| - 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*) |
| + 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | 'nacl' | GNU/*) |
| # we assume gcc |
| |
| if [ "x$LINK" = "x" ] ; then |
| # -linker was not specified so set default link command now |
| if [ $CPLUSPLUS = 1 ] ; then |
| - LINK=g++ |
| + LINK=${CXX} # g++ |
| else |
| - LINK=gcc |
| + LINK=${CC} # gcc |
| fi |
| fi |
| |
| @@ -271,7 +276,7 @@ case $ARCH in |
| elif [ $STATIC = 1 ] ; then |
| LIBNAME="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a" |
| echo "mklib: Making" $ARCH "static library: " ${LIBNAME} |
| - LINK="ar" |
| + LINK=${AR} # "ar" |
| OPTS="-ru" |
| if [ "${ALTOPTS}" ] ; then |
| OPTS=${ALTOPTS} |
| @@ -285,8 +290,8 @@ case $ARCH in |
| case $OBJ in |
| *.a) |
| # extract the .o files from this .a archive |
| - FILES=`ar t $OBJ` |
| - ar x $OBJ |
| + FILES=`${AR} t $OBJ` |
| + ${AR} x $OBJ |
| NEWOBJECTS="$NEWOBJECTS $FILES" |
| # keep track of temporary .o files and delete them below |
| DELETIA="$DELETIA $FILES" |
| @@ -300,7 +305,7 @@ case $ARCH in |
| |
| # make lib |
| ${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS} |
| - ranlib ${LIBNAME} |
| + ${RANLIB} ${LIBNAME} |
| |
| # remove temporary extracted .o files |
| rm -f ${DELETIA} |
| diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c |
| --- a/src/gallium/auxiliary/cso_cache/cso_context.c |
| +++ b/src/gallium/auxiliary/cso_cache/cso_context.c |
| @@ -268,7 +268,7 @@ void cso_release_all( struct cso_context *ctx ) |
| void cso_destroy_context( struct cso_context *ctx ) |
| { |
| if (ctx) { |
| - //cso_release_all( ctx ); |
| + /* cso_release_all( ctx ); */ |
| FREE( ctx ); |
| } |
| } |
| diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c |
| --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c |
| +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c |
| @@ -213,8 +213,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle, |
| vs->prepare(vs, draw); |
| } |
| |
| - |
| - //return TRUE; |
| + /* return TRUE; */ |
| } |
| |
| |
| diff --git a/src/gallium/auxiliary/draw/draw_pt_post_vs.c b/src/gallium/auxiliary/draw/draw_pt_post_vs.c |
| --- a/src/gallium/auxiliary/draw/draw_pt_post_vs.c |
| +++ b/src/gallium/auxiliary/draw/draw_pt_post_vs.c |
| @@ -210,7 +210,7 @@ void draw_pt_post_vs_prepare( struct pt_post_vs *pvs, |
| pvs->run = post_vs_viewport; |
| } |
| else { |
| - //if (opengl) |
| + /* if (opengl) */ |
| pvs->run = post_vs_cliptest_viewport_gl; |
| } |
| } |
| diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c |
| --- a/src/gallium/auxiliary/translate/translate_generic.c |
| +++ b/src/gallium/auxiliary/translate/translate_generic.c |
| @@ -217,7 +217,7 @@ ATTRIB( R8G8_SNORM, 2, char, FROM_8_SNORM, TO_8_SNORM ) |
| ATTRIB( R8_SNORM, 1, char, FROM_8_SNORM, TO_8_SNORM ) |
| |
| ATTRIB( A8R8G8B8_UNORM, 4, ubyte, FROM_8_UNORM, TO_8_UNORM ) |
| -//ATTRIB( R8G8B8A8_UNORM, 4, ubyte, FROM_8_UNORM, TO_8_UNORM ) |
| +/* ATTRIB( R8G8B8A8_UNORM, 4, ubyte, FROM_8_UNORM, TO_8_UNORM ) */ |
| |
| ATTRIB( R32G32B32A32_FIXED, 4, int, FROM_32_FIXED, TO_32_FIXED ) |
| ATTRIB( R32G32B32_FIXED, 3, int, FROM_32_FIXED, TO_32_FIXED ) |
| diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c |
| --- a/src/gallium/drivers/i915simple/i915_state.c |
| +++ b/src/gallium/drivers/i915simple/i915_state.c |
| @@ -58,8 +58,8 @@ translate_wrap_mode(unsigned wrap) |
| return TEXCOORDMODE_CLAMP_EDGE; |
| case PIPE_TEX_WRAP_CLAMP_TO_BORDER: |
| return TEXCOORDMODE_CLAMP_BORDER; |
| -// case PIPE_TEX_WRAP_MIRRORED_REPEAT: |
| -// return TEXCOORDMODE_MIRROR; |
| +/* case PIPE_TEX_WRAP_MIRRORED_REPEAT: */ |
| +/* return TEXCOORDMODE_MIRROR; */ |
| default: |
| return TEXCOORDMODE_WRAP; |
| } |
| diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h |
| --- a/src/mesa/main/compiler.h |
| +++ b/src/mesa/main/compiler.h |
| @@ -45,7 +45,7 @@ |
| #include <stdlib.h> |
| #include <stdio.h> |
| #include <string.h> |
| -#if defined(__linux__) && defined(__i386__) |
| +#if defined(__linux__) && defined(__i386__) && !defined(__native_client__) |
| #include <fpu_control.h> |
| #endif |
| #include <float.h> |
| diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c |
| --- a/src/mesa/shader/slang/slang_codegen.c |
| +++ b/src/mesa/shader/slang/slang_codegen.c |
| @@ -924,7 +924,7 @@ gen_return_with_expression(slang_assemble_ctx *A, slang_operation *oper) |
| slang_operation_copy(rhs, &oper->children[0]); |
| } |
| |
| - ///blockOper->locals->outer_scope = oper->locals->outer_scope; |
| + /* blockOper->locals->outer_scope = oper->locals->outer_scope; */ |
| |
| /*slang_print_tree(blockOper, 0);*/ |
| |
| diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c |
| --- a/src/mesa/state_tracker/st_atom.c |
| +++ b/src/mesa/state_tracker/st_atom.c |
| @@ -137,7 +137,7 @@ void st_validate_state( struct st_context *st ) |
| if (state->st == 0) |
| return; |
| |
| -// _mesa_printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st); |
| +/* _mesa_printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st); */ |
| |
| if (1) { |
| /* Debug version which enforces various sanity checks on the |
| @@ -152,7 +152,7 @@ void st_validate_state( struct st_context *st ) |
| const struct st_tracked_state *atom = atoms[i]; |
| struct st_state_flags generated; |
| |
| -// _mesa_printf("atom %s %x/%x\n", atom->name, atom->dirty.mesa, atom->dirty.st); |
| +/* _mesa_printf("atom %s %x/%x\n", atom->name, atom->dirty.mesa, atom->dirty.st); */ |
| |
| if (!(atom->dirty.mesa || atom->dirty.st) || |
| !atom->update) { |
| @@ -162,7 +162,7 @@ void st_validate_state( struct st_context *st ) |
| |
| if (check_state(state, &atom->dirty)) { |
| atoms[i]->update( st ); |
| -// _mesa_printf("after: %x\n", atom->dirty.mesa); |
| +/* _mesa_printf("after: %x\n", atom->dirty.mesa); */ |
| } |
| |
| accumulate_state(&examined, &atom->dirty); |
| @@ -175,7 +175,7 @@ void st_validate_state( struct st_context *st ) |
| assert(!check_state(&examined, &generated)); |
| prev = *state; |
| } |
| -// _mesa_printf("\n"); |
| +/* _mesa_printf("\n"); */ |
| |
| } |
| else { |
| diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c |
| --- a/src/mesa/state_tracker/st_cb_bitmap.c |
| +++ b/src/mesa/state_tracker/st_cb_bitmap.c |
| @@ -515,7 +515,7 @@ reset_cache(struct st_context *st) |
| struct pipe_screen *screen = pipe->screen; |
| struct bitmap_cache *cache = st->bitmap.cache; |
| |
| - //memset(cache->buffer, 0xff, sizeof(cache->buffer)); |
| + /* memset(cache->buffer, 0xff, sizeof(cache->buffer)); */ |
| cache->empty = GL_TRUE; |
| |
| cache->xmin = 1000000; |
| diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c |
| --- a/src/mesa/vbo/vbo_exec_array.c |
| +++ b/src/mesa/vbo/vbo_exec_array.c |
| @@ -149,7 +149,7 @@ check_array_data(GLcontext *ctx, struct gl_client_array *array, |
| array->Ptr, array->BufferObj->Name); |
| f[k] = 1.0; /* XXX replace the bad value! */ |
| } |
| - //assert(!IS_INF_OR_NAN(f[k])); |
| + /* assert(!IS_INF_OR_NAN(f[k])); */ |
| } |
| } |
| break; |