Skip to content

Compiling on OSX 10.10 Dies #11

Description

@ril3y

There were some simple compiler checks that for some reason always evaluated to true. Gcc on osx did not like that at all and just died. I went ahead and removed the comparisons and it compiled just fine. This is the patch if you were interested in it.

From 8f5f15017f79e79f95bec65e88961736da43c3fb Mon Sep 17 00:00:00 2001
From: riley porter
Date: Wed, 14 Oct 2015 16:12:45 -0400
Subject: [PATCH] fixed compiler errors on osx


src/flash/nor/sim3x.c | 4 ++--
src/target/xtensa.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/flash/nor/sim3x.c b/src/flash/nor/sim3x.c
index 7ec0076..ecf6ba7 100644
--- a/src/flash/nor/sim3x.c
+++ b/src/flash/nor/sim3x.c
@@ -864,14 +864,14 @@ static int sim3x_flash_info(struct flash_bank *bank, char *buf, int buf_size)
return ERROR_BUF_TOO_SMALL;

        /* Package */
  •       if (sim3x_info->device_package) {
    
  •         printed = snprintf(buf, buf_size, "-G%s", sim3x_info->device_package);
            buf += printed;
            buf_size -= printed;
    
            if (buf_size <= 0)
                return ERROR_BUF_TOO_SMALL;
    
  •       }
    
  • }
    
    }

diff --git a/src/target/xtensa.c b/src/target/xtensa.c
index 216a363..009b0fb 100644
--- a/src/target/xtensa.c
+++ b/src/target/xtensa.c
@@ -377,7 +377,7 @@ static int xtensa_tap_queue_write_sr(struct target *target, enum xtensa_reg_idx
struct xtensa_core_reg *xt_reg;
int res;

  • if(idx < 0 || idx >= XT_NUM_REGS)
  • if( idx >= XT_NUM_REGS)
    return ERROR_COMMAND_SYNTAX_ERROR;

reg = &reg_list[idx];
@@ -1197,7 +1197,7 @@ static int xtensa_write_register(struct target *target, enum xtensa_reg_idx idx)
if (target->state != TARGET_HALTED)
return ERROR_TARGET_NOT_HALTED;

  • if(idx < 0 || idx >= XT_NUM_REGS)
  • if( idx >= XT_NUM_REGS)
    return ERROR_COMMAND_SYNTAX_ERROR;

reg = &reg_list[idx];

2.4.6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions